Sep-12-2021, 01:34 PM
(This post was last modified: Sep-25-2021, 01:34 AM by mishraakash.)
Python is dynamically typed language. It has basically two types of loop
students = ['Peter', 'Camren', 'Andres', 'Jo', 'Geoff']
for name in students:
print(name, len(name))
For loop can be used with list.,strings & tuples etc
Can refer this article on QuizCure Different types of loops in python
[/url] for more examples for loops in python.
- For Loop
- While loop
students = ['Peter', 'Camren', 'Andres', 'Jo', 'Geoff']
for name in students:
print(name, len(name))
For loop can be used with list.,strings & tuples etc
Can refer this article on QuizCure Different types of loops in python
[/url] for more examples for loops in python.