+ 2

How to add spaces within variables and string?

Phyton https://code.sololearn.com/cdya9Dn1IsfP/?ref=app

15th Mar 2021, 2:41 PM
Dyla Anisa
Dyla Anisa - avatar
5 ответов
+ 7
You can use print() or add "\n" at the end of the string. x = 123.456 print(x) print() x = "This is a string" print(x + "!\n") #rest
15th Mar 2021, 2:44 PM
Simba
Simba - avatar
+ 4
Use comma or just add space between them print("?" , d) print(e , '!') OR print("?" +" "+ d) print(e +" "+'!')
15th Mar 2021, 2:44 PM
Anshika
Anshika - avatar
+ 2
Thank you both Anshika and Simba 😊 Will try both of your suggestions
15th Mar 2021, 2:49 PM
Dyla Anisa
Dyla Anisa - avatar
0
please learn to me phyton
16th Mar 2021, 6:24 PM
Zakir Ur Rahman
Zakir Ur Rahman - avatar
0
haw to learn phyton please give me some ideia
16th Mar 2021, 6:25 PM
Zakir Ur Rahman
Zakir Ur Rahman - avatar