sashahafner / pystupid

Some notes on Python syntax and more
GNU General Public License v3.0
2 stars 0 forks source link

Multiple assignment #6

Open sashahafner opened 1 year ago

sashahafner commented 1 year ago

Kind of neat, if potentially confusing.

a, b = b, a+b

means:

 a = b
b = a + b

https://docs.python.org/3/tutorial/introduction.html#lists