DEV Community

TejashwiniVijaykumar
TejashwiniVijaykumar

Posted on

Python loops

In computer programming, loops are used to repeat a block of code. The for loop in Python is used to iterate over a sequence, which could be a list, tuple, array, or string. While loop in python is used to execute statements when the condition satisfies the true value. While loop requires defining a specific relevant variable such as indexing variable 'i' = 1.

Top comments (0)