0
Would you describe this code ?
Would you describe this code, specially line 3 (comprehensively) ? https://code.sololearn.com/c4n45ypZOEDv/?ref=app
2 Antworten
0
msg = "Numbers: {0} {1} {2}". format(nums[0], nums[1], nums[2])
{0}=nums [0], If it was like {2} it's value would be equal to nums [2]
0
{n} in format string indicate to format to replace this piece (curly brace and n) with the n-th parameter in format call (n start from zero)