F&A Diskussionen
Hide web directory with error msg
0 Stimmen
7 AntwortenAnyone suffering msg bugs?
8 Stimmen
4 Antwortenbaffling Python error msg
0 Stimmen
1 AntwortI am not able to msg anyone
0 Stimmen
6 AntwortenI can't send msg to my friends
1 Stimme
1 AntwortCODE PLAYGROUND
1 Stimme
2 AntwortenWhy this code runs?:
nums = [4, 5, 6]
msg = "Numbers: {} {}". format(nums[0], nums[1], nums[2])
print(msg)
Numbers:4, 5.
Byt the code:
nums = [4, 5, 6]
msg = "Numbers: {} {} {} {}". format(nums[0], nums[1], nums[2])
print(msg)
leading to error?
IndexError: tuple index our of range
1 Stimme
3 AntwortenI 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 Stimmen
5 AntwortenHeute heiß
Sticky position
3 Votes
Help please?
3 Votes
Ejercicio Pytho
0 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
SQL practice
2 Votes