0

Could someone explain what each of these things would do to a given string?

string1 = "{:~^10}"

# (another one)
string2 = "{:>10}"
Chris
  • 22,987
  • 3
  • 18
  • 40
J. Dow
  • 1
  • 2
    Possible duplicate of [How can I fill out a Python string with spaces?](https://stackoverflow.com/questions/5676646/how-can-i-fill-out-a-python-string-with-spaces) – Chris May 29 '19 at 02:20
  • 1
    https://docs.python.org/3/library/string.html#format-string-syntax – wwii May 29 '19 at 02:30
  • These lines do exactly what they look like. They set the variable to the string given. There is no formatting involved at this time. – Klaus D. May 29 '19 at 04:20

0 Answers0