Python example f"{heading:=^30}"

38 Views Asked by At

I ran across this in a basic Python tutorial (https://docs.python.org/3.10/tutorial/controlflow.html). The example is:

>>> heading = "Centered string"
>>> f"{heading:=^30}"
'=======Centered string========'

I did some searching but all I could find was a reference to '^' as an X-OR function.

Can someone point me in the right direction?

TIA

0

There are 0 best solutions below