Python Check If Array Is Sorted

[Solved] Python Check If Array Is Sorted | Haskell - Code Explorer | yomemimo.com
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

Answers related to python check if array is sorted

Code Explorer Popular Question For Haskell