Python told me a Joke

2024-09-03 Thread Alan Bawden via Python-list
Python 3.10.5 (v3.10.5:f37715, Jul 10 2022, 00:26:17) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> x,_,z = [1,2,3] Works as expected. Now I didn't expect the following to work (but Python sometimes surprises me!), so I tried: >>

Re: Python told me a Joke

2024-09-03 Thread Mild Shock via Python-list
You can try: >>> 1,2 == 2,2 (1, True, 2) Its the same as: >>> 1, (2 == 2), 2 (1, True, 2) Hope this helps! Alan Bawden schrieb: Python 3.10.5 (v3.10.5:f37715, Jul 10 2022, 00:26:17) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>>