Q&A Discussions
Help, input does not work
0 Votes
8 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
Gimme some advice
1 Votes
Doubt in C
1 Votes
Php?
0 Votes
how to create my own html page
0 Votes
React js
0 Votes
Data science
2 Votes
Hi how to make game
1 Votes