On 08/17/2015 01:42 PM, Владислав wrote:
x = [1, 2, 4, 2, 1, 3] x = list(set(x)).sort() print(x) /# output: None/I know that sort() returns None, but I guess that it would be returned x that was sorted. Why so?
If sort() returns None, than the following: x = list(set(x)).sort() is equivalent to writing: x = None So I don't really understand your question, I'm sorry... Cheers, Fabien -- https://mail.python.org/mailman/listinfo/python-list