+ 1

How to make a dot appear after a number

Like this 1.

22nd Jun 2022, 6:51 AM
Wisdom
Wisdom - avatar
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?
22nd Jun 2022, 9:15 AM
Lothar
Lothar - avatar
0
Thanks
22nd Jun 2022, 7:57 AM
Wisdom
Wisdom - avatar
0
Oh no sorry just saw the question and happened to know the answer
5th Jul 2022, 8:37 AM
Ambrose Husser
Ambrose Husser - avatar
- 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".")
22nd Jun 2022, 7:39 AM
Ambrose Husser
Ambrose Husser - avatar