How make string? | Sololearn: Learn to code for FREE!

0

How make string?

11/25/2021 12:30:13 PM

Sh.M

9 Answers

New Answer

+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.

+3

Sh.M Which question? If you mean a challenge from python lesson you should mention which python course and which lesson challenge. The best is to copy&paste the description here.

+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. ...