Hi Daniil.
Yes, you can do almost same:
tt = 5
while tt := tt - 1:
print(tt)
04.08.2023 9:18, daniil.arashkev...@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 somet
I'm not sure if you are trolling, but why not use "range"? Can't get
more Pythonic than that.
--
*Powertools Technologies, Lda*
R. Alves Redol 9 * 1000-029 Lisboa * Portugal
Phone: +351 214 009 555 * GPS: 38°44'10.927"N 9°8'26.757"W
E-mail: cont...@powertools-tech.com * https://www.powertool
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
__