[added] isSorted function for iterables
This commit is contained in:
parent
43f9e6fe0d
commit
9b1f7541fd
@ -32,7 +32,8 @@ def runProgram(cmd, parameter=None):
|
|||||||
output = subprocess.check_output('{} | tee /dev/stderr'.format(cmd),
|
output = subprocess.check_output('{} | tee /dev/stderr'.format(cmd),
|
||||||
shell = True)
|
shell = True)
|
||||||
|
|
||||||
|
def isSorted(iterable):
|
||||||
|
return sorted(iterable) == iterable
|
||||||
|
|
||||||
def fnConstructor(s):
|
def fnConstructor(s):
|
||||||
if type(s) is str:
|
if type(s) is str:
|
||||||
|
Loading…
Reference in New Issue
Block a user