diff --git a/python-for-beginners/12 - Loops/for.py b/python-for-beginners/12 - Loops/for.py index 90bf46a5..9ca1aa35 100644 --- a/python-for-beginners/12 - Loops/for.py +++ b/python-for-beginners/12 - Loops/for.py @@ -1,2 +1,10 @@ -for name in ['Christopher', 'Susan']: - print(name) +name = ['Christopher', 'Susan'] ## list of names + +for nm in name: ## This will iterate(in simple words it will fetch the values) the name list one by one till the last element/values reached + print(nm) + +OUTPUT : + Christopher + Susan + +# For better understanding just take a list of numbers( i.e, [0,1,2,3,4,5,6,7,8,9]) and iterate this list using a for loop