Issue
Well, I found something on python.
This is coding that I've done.
>>>list = [ x for x in input("input your elements composed with only numbers:").split()]
>>>list = list.sort() # in this point, all of values is disappeared..
Can you tell me, why?
Solution
list.sort()
returns None
and not a sorted list, you need to use sorted(list)
...
Answered By - Idos
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.