New course! Every coder should learn Generative AI!
Try a free lessonQ&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 Answerswhile loop
1 Vote
5 AnswersHot today
Media on HTML
0 Votes
Is Sololearn better or Mimo.org?
1 Votes
xampp
0 Votes
Code Playground
0 Votes
How to solve this
1 Votes
Java project
0 Votes
Editor HTML
0 Votes
Jungle capming
0 Votes