Anonymous user
Sorting algorithms/Bogosort: Difference between revisions
→{{header|Python}}: in_order alternative
(added python) |
(→{{header|Python}}: in_order alternative) |
||
Line 128:
last = x
return True</python>
Alternative definition for in_order (Python 2.5)
<python>def in_order(l):
return not l or all( l[i] < l[i+1] for i in range(0,len(l)-1))</python>
|