0
How can I bring solve this by bringing the numbers and dots closer?
How can I bring solve this by bringing the numbers and dots closer? https://code.sololearn.com/c39DBRP50HNZ/?ref=app
10 Antworten
+ 3
Also have a look at f-strings:
print(f"{i}.")
They are a more modern way of formatting :)
+ 1
Please tag the relevant programming language.
Is it a code project? Which task is it exactly?
Which course is it?
Please show your code!
+ 1
DN Josh
Those curly brackets are whats called placeholders, we can fill the place holders with the .format() method,and enter in values based on the curly bracket positions,seperated with commas.
0
Lisa check up there 👆👆
0
You could use the sep- argument of print and put it print(..., sep="")
0
DN Josh
Do a string formatting
print("{}{}".format(i,"."))
0
edit the code and check if it works
0
raynard works perfectly
0
What is the function of the two curly brackets?
0
Lisa this is the simplest way of doing it. I ❤️this idea