In entering five random number, how can I best sort
it into ascending order, such as 0511414453? Using
Linux 2.7.6 in Ubuntu 14.04.4. Thanks.
number01 = "41"
number02 = "11"
number03 = "05"
number04 = "53"
number05 = "44"
line = number01 + number02 + number03 + number04 + number05
print
print line
line.sort()
print
print line
4111055344
Traceback (most recent call last):
File "Mega_Millions_01_Tickets_Entry_TEST_TEST.py", line 11, in <module>
print line.sort()
AttributeError: 'str' object has no attribute 'sort'
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor