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