+ 1

String formatting [Py]

I want to use this code: print("{:^20}".format("Welcome")) Out: " Welcome " but I want an output like this: "------Welcome------" I mean, replacing the blank spaces with another symbol. Can you help me?

19th Jun 2018, 6:54 PM
Jp Reyes
Jp Reyes - avatar
1 Réponse
0
Ty <3
19th Jun 2018, 7:54 PM
Jp Reyes
Jp Reyes - avatar