Walrus operator
To finalize previous post.
n = 0
while (s := input()).lower() != "конец":
n += 1
print(n)
I think, it's the most elegant approach. But it uses "walrus operator" which appeared only in python 3.8.
EN / RU
December 24, 2025

Walrus operator
To finalize previous post.
n = 0
while (s := input()).lower() != "конец":
n += 1
print(n)
I think, it's the most elegant approach. But it uses "walrus operator" which appeared only in python 3.8.