0

How do you create string in python

18th Feb 2017, 4:11 PM
anu
anu - avatar
3 Answers
+ 4
You can also make a string out of practically everything with str() method. For example: x = 6.0 y = str(x) print(y) >>> 6.0 <-- this is actually a '6.0' string :)
18th Feb 2017, 4:39 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 3
just put your code inside the quotes var1 = 'Hello World' or var2 = "Hello World"
18th Feb 2017, 4:13 PM
Akshata
Akshata - avatar
0
thanks
19th Feb 2017, 9:56 AM
anu
anu - avatar