0
How make string?
9 odpowiedzi
+ 2
Sh.M
Did you tried to print my example?
print("Hello\nWorld")
Output:
Hello
World
Instead of Hello write 1. instead of World write 2. continue this series with all numbers.
+ 6
Question is unclear.
string = "text here"
#is a syntax for declaring a variable and assigning a string to it. Is that what you want?
+ 3
Sh.M
str = "Hello\nWorld"
Something like this? Your questions is still unclear.
+ 1
You need to make a program for a leaderboard.
The program needs to output the numbers 1 to 9, each on a separate line, followed by a dot:
1.
2.
3.
...
+ 1
Actually is good answer
Honestly, I made it very complicated and I wanted it to be a code that would write "n" to me indefinitely.
+ 1
Sh.M you can use the sep ,end arguments of print statement to accomplish this task
print(*range(1,10),sep='.\n',end='.')
0
No actually i want string with \n
0
The question asked me the codes of this output:
1.
2.
3.
4.
...