📜  python 检查数组是否已排序 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:05.542000             🧑  作者: Mango

代码示例1
#! /usr/bin/python3
# useing all 
if( all( yourArray[item] <= yourArray[item + 1] for item in range( len( yourArray ) - 1 ) ) ):