
Hi Daniil. Yes, you can do almost same: tt = 5 while tt := tt - 1: print(tt) 04.08.2023 9:18, Daniil.arashkevich@gmail.com пишет:
Currently in Python we have construction like this:
tt = 5 while t: # do something tt -= 1
It would be great if in Python we have something like this: tt = 5 while (tt--): # do something
It is exists in C++. And in my opinion it is very Pythonic _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/GRIWCD... Code of Conduct: http://python.org/psf/codeofconduct/