The conversation between human and AI assistant.
What is the iteration in Python?
What is the difference between a for loop and a while loop?
A for loop is used to iterate over a sequence (such as lists, tuples, and strings) and execute a block of code a specific number of times. A while loop is used to execute a block of code as long as a specific condition is true.