0

How to create an out put like this "1", "2", " 3" and so on? using a python

2nd Jun 2019, 1:16 AM
(NEO)PHYTE
(NEO)PHYTE - avatar
11 Answers
0
Here: for i in range(10): print("\""+str(i)+"\"")
2nd Jun 2019, 2:17 AM
Mo Hani
Mo Hani - avatar
0
#this code will give you what you want from 0 to 9 for i in range (10): print str(i)
2nd Jun 2019, 1:31 AM
madie
0
an error occured sir
2nd Jun 2019, 1:39 AM
(NEO)PHYTE
(NEO)PHYTE - avatar
0
whats the error?
2nd Jun 2019, 1:42 AM
madie
0
syntax error
2nd Jun 2019, 1:44 AM
(NEO)PHYTE
(NEO)PHYTE - avatar
0
syntax error
2nd Jun 2019, 1:44 AM
(NEO)PHYTE
(NEO)PHYTE - avatar
0
i think str is the systax error
2nd Jun 2019, 1:47 AM
(NEO)PHYTE
(NEO)PHYTE - avatar
0
that means there is a problem with the way you wrote your code, make sure you indent the line after for and dont forget the : at the end of the for loop. the code logic is ok though
2nd Jun 2019, 1:48 AM
madie
0
Is this what you mean? print("1,2,3,4,5".split(","))
2nd Jun 2019, 1:49 AM
Mo Hani
Mo Hani - avatar
0
Mo Hani no, I mean a program that will show this kind of out put. "1" "2" "3" and so on.
2nd Jun 2019, 1:51 AM
(NEO)PHYTE
(NEO)PHYTE - avatar
0
thanks a lot <3
2nd Jun 2019, 2:18 AM
(NEO)PHYTE
(NEO)PHYTE - avatar