Python Forum
remove zeros at the end of a number
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
remove zeros at the end of a number
#3
Do you need to put the f in front of each variable?

resultat.insert(INSERT, f'{str(n):.0f}' + '\t' + f'{carres:.0f}' + '\t' + f'{cubes:.0f}' + '\n'')
Reply


Messages In This Thread
remove zeros at the end of a number - by Frankduc - Feb-25-2022, 02:28 PM
RE: remove zeros at the end of a number - by Frankduc - Feb-25-2022, 03:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Remove Specific Columns when the number of columns is greater than a specific value CuriousOne 0 1,366 Sep-09-2021, 09:17 PM
Last Post: CuriousOne
  Solving for zeros of an equation! fmitchell17 0 1,883 Apr-05-2021, 07:49 PM
Last Post: fmitchell17
  Dataframe Removes Zeros JoeDainton123 2 4,498 Sep-17-2020, 12:47 PM
Last Post: scidam
  How to keep leading zeros with pandas? eeps24 1 6,696 May-20-2020, 07:51 PM
Last Post: deanhystad
  Probs with leading zeros falling away :-) Badosc 2 2,921 Dec-04-2018, 08:57 PM
Last Post: Badosc
  Controlling trailing zeros with rounding? RedSkeleton007 1 24,622 Jan-25-2018, 07:23 AM
Last Post: j.crater
  leading zeros kerzol81 7 7,231 Apr-23-2017, 03:53 PM
Last Post: kerzol81
  program is related to leading zeros amrita 3 3,906 Apr-13-2017, 06:57 AM
Last Post: wavic

Forum Jump:

User Panel Messages

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