Q&A Discussions
I 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
Checking personal activity
0 Votes
Help
0 Votes
Where is the error
0 Votes
Use of global function in c
0 Votes
Which one is better?? And why??
1 Votes
Python
0 Votes
Full form of HTML
0 Votes
Tryna learn dunno where to start
0 Votes