+ 6
Here is how you would put it right in the center.
p = "pyt hon"
+ 3
My answer was a bit cheeky. Olatomide Akintomide we will need more description from you. What kind of space - tab, space, or blank line?
Please give a clear example of your intended result, and share any code where you are having trouble doing it.
+ 3
Ah, but wait, there is more.
Suppose you use the comma approach to have print insert spaces for you. You can also tell print to insert a custom string instead of space by using sep= to change the separator. For example, you can change it to "::".
print("***",text,"***",sep="::")
+ 1
I think that
text: input()
should be
text = input()
To add spaces you could insert them in the "***" strings like this:
print("*** "+text+" ***")
Alternatively, if you replace the + operators with commas, then Python will print the arguments with a space between them:
print("***",text,"***")
0
Space in double or single quotation mark.