Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/JortSort/Python/jortsort.py
Normal file
11
Task/JortSort/Python/jortsort.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
>>> def jortsort(sequence):
|
||||
return list(sequence) == sorted(sequence)
|
||||
>>> for data in [(1,2,4,3), (14,6,8), ['a', 'c'], ['s', 'u', 'x'], 'CVGH', 'PQRST']:
|
||||
print(f'jortsort({repr(data)}) is {jortsort(data)}')
|
||||
jortsort((1, 2, 4, 3)) is False
|
||||
jortsort((14, 6, 8)) is False
|
||||
jortsort(['a', 'c']) is True
|
||||
jortsort(['s', 'u', 'x']) is True
|
||||
jortsort('CVGH') is False
|
||||
jortsort('PQRST') is True
|
||||
>>>
|
||||
Loading…
Add table
Add a link
Reference in a new issue