Question : python check if array is sorted
Answered by : wicked-wolf-kfrr7ktv1iyg
#! /usr/bin/python3
# useing all
if( all( yourArray[item] <= yourArray[item + 1] for item in range( len( yourArray ) - 1 ) ) ):
Source : | Last Update : Sat, 04 Dec 21