Python Forum
How did one column get left-justified?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How did one column get left-justified?
#3
Right justify >
Left justify <
Center justify ^
greeting = "Hello"
print(f"{greeting:<10}\n{greeting:>10}\n{greeting:^10}\n{greeting:10}")
Output:
Hello Hello Hello Hello
Reply


Messages In This Thread
How did one column get left-justified? - by Mark17 - Feb-26-2022, 07:19 PM
RE: How did one column get left-justified? - by deanhystad - Feb-26-2022, 08:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PyQT5 - align left frohr 7 4,121 May-07-2022, 09:56 PM
Last Post: deanhystad
  Explanation of the left side of this statement please rascalsailor 3 2,570 Sep-09-2020, 02:02 PM
Last Post: rascalsailor
  How to left align logging messages Mekala 3 6,945 Jun-28-2020, 04:04 PM
Last Post: bowlofred
  How to left align the columns SriRajesh 6 4,011 Dec-28-2019, 04:04 PM
Last Post: SriRajesh
  Why is left mouse click not working? yeto 3 6,289 Jul-15-2019, 05:23 AM
Last Post: Yoriz
  str.format rounding to the left of the decimal ClassicalSoul 2 2,529 Mar-27-2019, 11:12 AM
Last Post: perfringo
  Move a character left or right in a file. DreamingInsanity 4 4,930 Mar-21-2019, 07:52 PM
Last Post: DreamingInsanity

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020