Space between input | Sololearn: Learn to code for FREE!

+1

Space between input

How to spaces between input and stars

8/20/2021 12:51:43 PM

Ali Rezaei Adl

4 Answers

New Answer

+8

x=input() print ("*** " + x + " ***")

+4

x=input() print ("***" + x + "***") Space between stars and x

+4

If you mean Formatting Text in Python, here's some sample code: https://code.sololearn.com/cY1QpcYktJ2Y/?ref=app

+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, "***")