+ 2
Why I get different result when I multiply index numbers
nums = [4,7,3,1] for x in nums: Â print(x * 2) Output 8 14 6 2 nums = [1,2,3] print(nums * 3) Output [1,2,3,1,2,3,1,2,3]
1 Answer
+ 1
Thank you so much!!
nums = [4,7,3,1] for x in nums: Â print(x * 2) Output 8 14 6 2 nums = [1,2,3] print(nums * 3) Output [1,2,3,1,2,3,1,2,3]