[added] isSorted function for iterables

This commit is contained in:
Sebastian Wehling-Benatelli 2015-10-30 06:12:23 +01:00
parent 43f9e6fe0d
commit 9b1f7541fd

View File

@ -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: