+ 1

Iteration

Im always confuse this

26th Jan 2024, 3:31 PM
Sanginov Surush
Sanginov Surush - avatar
3 ответов
+ 3
Describe the problem more precisely. Ask a question. Do not mark your own comment as "best" when it is not an answer to the question.
26th Jan 2024, 4:01 PM
Lisa
Lisa - avatar
+ 3
Surush , Iteration (and verb, iterate) is a general computer-language term meaning (roughly) doing the same thing to many things in a row, one by one. That's usually accomplished with "loop" structures. In Python, the available loops are for and while. For example, if I wanted to print every character of a string, one by one, I might use a for loop to iterate through the characters of the string, printing each one as I find it. my_string = "farm" for character in my_string: print(character) Output: f a r m
26th Jan 2024, 6:22 PM
Rain
Rain - avatar
+ 1
Ok
26th Jan 2024, 4:44 PM
Sanginov Surush
Sanginov Surush - avatar