+ 1
How to make a dot appear after a number
Like this 1.
4 Antworten
+ 2
Ambrose Husser ,
print(2\.) is incorrect syntax and raises an error.
also:
print(1,2,3,4,5,6,7,sep".") is incorrect. the mentioned code does not create a list of numbers but raises an error.
the use of the "sep" keyword in print() function should be: print(1,2,3,4,5,6,7,sep=".")
Wisdom ,
i suppose that you are trying to solve the "leaderboard exercise" in python for beginners. can you link your code here?
0
Thanks
0
Oh no sorry just saw the question and happened to know the answer
- 1
us an escape character. I'm guessing this is in python, so for example
print(2\.)
or if you want to do it to a list of numbers
print(1,2,3,4,5,6,7,sep".")