Answer the question
In order to leave comments, you need to log in
Which code entry is more correct in terms of Python?
There is a code:
a = 1
while <условие>:
print (a)
a += 1
Answer the question
In order to leave comments, you need to log in
for a in range(1, 10):
print a
a < 10 is closer to "self-documenting" code, and therefore preferable.
Which notation is more correct and why "while a != 10: " or "while a < 10:"
while a != 10
will turn into an endless loop. And Dmitry AlexandrovichDidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question