99% of Python programmers don’t know this feature

Have you used or knew about this feature before?

text = "PYTHON"

print(f"{text}")
# PYTHON
print(f"{text:#<20}")
# PYTHON##############
print(f"{text:_>20}")
# ______________PYTHON
print(f"{text:.^20}")
# .......PYTHON.......
enter fullscreen mode

exit fullscreen mode

Leave a Comment