Python Forum
String formatting difficulties
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String formatting difficulties
#3
This should work. The comma must come after the 8.
'{:8,.2f}'
I haven't read the specification now, but you'll find it in the documentation.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
String formatting difficulties - by mmk1995 - Aug-09-2019, 10:33 AM
RE: String formatting difficulties - by wavic - Aug-09-2019, 10:57 AM
RE: String formatting difficulties - by DeaD_EyE - Aug-09-2019, 11:04 AM
RE: String formatting difficulties - by wavic - Aug-09-2019, 11:18 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Formatting a date time string read from a csv file DosAtPython 5 1,297 Jun-19-2023, 02:12 PM
Last Post: DosAtPython
  String formatting (strptime) issues Henrio 2 843 Jan-06-2023, 06:57 PM
Last Post: deanhystad
  confused about string formatting barryjo 7 2,000 Mar-06-2022, 02:03 AM
Last Post: snippsat
  string formatting barryjo 7 2,073 Jan-02-2022, 02:08 AM
Last Post: snippsat
  Help with string formatting in classes brthurr 6 9,360 Dec-17-2021, 04:35 PM
Last Post: Jeff900
  Question on HTML formatting with set string in message Cknutson575 3 3,503 Mar-09-2021, 08:11 AM
Last Post: Cknutson575
  smtplib: string formatting not carrying over to email ClassicalSoul 1 2,661 Apr-22-2020, 09:58 PM
Last Post: bowlofred
  difficulties to chage json data structure using json module in python Sibdar 1 2,088 Apr-03-2020, 06:47 PM
Last Post: micseydel
  string formatting Uchikago 1 1,933 Jun-28-2019, 03:28 PM
Last Post: buran
  TypeError: not all arguments converted during string formatting RedSkeleton007 1 14,977 Jul-15-2018, 08:51 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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