Q&A Discussions
summartion of even nums
1 Vote
2 AnswersImport random
0 Votes
16 AnswersI dont unserstand the output if this code :
# string formatting
nums = [4, 5, 6]
msg = "Numbers: {0} {0} {2}". format(nums[0], nums[1], nums[2])
print(msg)
4 4 6
but when I do :
# string formatting
nums = [4, 5, 6]
msg = "Numbers: {0} {0} {2}". format(nums[1], nums[1], nums[2])
print(msg)
it gives me
5 5 6
is there a priority in the Reading ?
0 Votes
5 AnswersHot today
Fix code
0 Votes
Fast coding (mobile)
1 Votes
..
1 Votes
Software to write and run codes
1 Votes
Beginner_to_SoloLearn
2 Votes
Add lua
0 Votes
Coding help
1 Votes
Summary please??
0 Votes