foor kloop python code example
Example 1: for loops
MyString = ""
for i in range(5):
MyString += "hi"
print(MyString)
Example 2: python for loop
nums = ['one', 'two', 'three']
for elem in nums:
print(elem)
MyString = ""
for i in range(5):
MyString += "hi"
print(MyString)
nums = ['one', 'two', 'three']
for elem in nums:
print(elem)