+ 1
Can somebody please help me understand this
inNum = [2,4] inNum2= [4,5,6,7,8] for inNum2 in inNum: print(inNum2) Output: 2 4 Code: https://code.sololearn.com/cWZfqDMlHPHz/?ref=app
2 Réponses
+ 2
inNum2 is first initialized by a list but after that it became a itterrator variable where values of list inNum are assigned to inNum2 and as inNum have 2 valued 2 , 4 so inNum2 prints both value in 2 times
+ 3
It's like maths sets