(Jan-11-2019, 01:13 PM)fooikonomou Wrote: how to sort the tuple values form ex: (6,1,5) --> to (1,5,6)?
Like with built-in function sorted()? Note, that it will return list, not tuple (tuples are immutable).
>>> t = (6, 1, 5) >>> sorted(t) [1, 5, 6]It you need tuple, then you can just convert it back
tuple(sorted(t))
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.