diff --git a/Loops.py b/Loops.py new file mode 100644 index 00000000..6a33bc7a --- /dev/null +++ b/Loops.py @@ -0,0 +1,9 @@ +# Python For Loop : the for loop in python is used to iterate over a sequence(list,tuple string) or other iterable objects. + +# iterating over a sequence is called traversal + + +#for loops with list +a=['apple','mango','banana','orange'] +for name in a: + print(name *2) # when a string is multiplied to any integer it gets itself repeated that many times