+ 8
I can not explain these numbers to the outpyt although I have constantly changed the values in the code ?
4 Respuestas
+ 4
See if you can figure it out by looking at this example.
https://code.sololearn.com/c1jUMgkjVMXD/?ref=app
+ 4
just remove the numbers inside the curly brackets or put them in the order that you want. putting 1 , 1 ,1 will return second choice in the format.
+ 2
What you need to change is first part in msg, like:
“Numbers: {} {} {}”.format()
Try this for example:
# string formatting
nums = [4, 5, 6]
msg = "Numbers: {}{}{}". format(nums[1], nums[0], nums[0])
print(msg)
+ 1
Keep the curly brackets empty.
Fixed:
https://code.sololearn.com/cOLzW2NHGkHt/?ref=app