+ 1

Space between input

How to spaces between input and stars

20th Aug 2021, 12:51 PM
Ali Rezaei Adl
Ali Rezaei Adl - avatar
4 Respostas
+ 8
x=input() print ("*** " + x + " ***")
20th Aug 2021, 1:04 PM
SAN
SAN - avatar
+ 4
x=input() print ("***" + x + "***") Space between stars and x
20th Aug 2021, 12:59 PM
Ali Rezaei Adl
Ali Rezaei Adl - avatar
+ 4
If you mean Formatting Text in Python, here's some sample code: https://code.sololearn.com/cY1QpcYktJ2Y/?ref=app
20th Aug 2021, 1:34 PM
Solo
Solo - avatar
+ 3
You can do this with the following codes (there are more ways of doing it): >> x = input() >> print("*** {0} ***".format(x)) >> x = input() >> print(f"*** {x} ***") >> x = input() >> print("***", x, "***")
20th Aug 2021, 1:02 PM
Baspberry