Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95431 > unrolled thread
| Started by | Fabien <fabien.maussion@gmail.com> |
|---|---|
| First post | 2015-08-17 16:12 +0200 |
| Last post | 2015-08-17 16:12 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Python 3 sort() problem Fabien <fabien.maussion@gmail.com> - 2015-08-17 16:12 +0200
| From | Fabien <fabien.maussion@gmail.com> |
|---|---|
| Date | 2015-08-17 16:12 +0200 |
| Subject | Re: Python 3 sort() problem |
| Message-ID | <mqsq4l$bq2$1@speranza.aioe.org> |
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
Back to top | Article view | comp.lang.python
csiph-web