Python Forum
program is related to leading zeros
Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
program is related to leading zeros
#3
don't use eval, use int to convert user input. or think of different approach, that would not require conversion to int, actually it will use that the user input is str
Finally, this looks like homework and printing [ and ] looks like clumsy attempt to visually achieve required result (i.e. list)
Reply


Messages In This Thread
program is related to leading zeros - by amrita - Apr-13-2017, 05:54 AM
RE: program is related to leading zeros - by buran - Apr-13-2017, 06:41 AM
RE: program is related to leading zeros - by wavic - Apr-13-2017, 06:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Removing leading whitespaces palladium 1 794 Mar-24-2023, 04:15 PM
Last Post: bowlofred
  Removing leading\trailing spaces azizrasul 8 2,947 Oct-23-2022, 11:06 PM
Last Post: azizrasul
  How to retrieve records in a DataFrame (Python/Pandas) that contains leading or trail mmunozjr 3 1,896 Sep-05-2022, 11:56 AM
Last Post: Pedroski55
  -i option changes sys.path (removes leading empty string '') markanth 6 2,115 Aug-26-2022, 09:27 PM
Last Post: markanth
  remove zeros at the end of a number Frankduc 7 2,292 Feb-25-2022, 03:48 PM
Last Post: Frankduc
  Solving for zeros of an equation! fmitchell17 0 1,894 Apr-05-2021, 07:49 PM
Last Post: fmitchell17
  Although this is a talib related Q it's mostly related to python module installing.. Evalias123 4 5,877 Jan-10-2021, 11:39 PM
Last Post: Evalias123
  Dataframe Removes Zeros JoeDainton123 2 4,541 Sep-17-2020, 12:47 PM
Last Post: scidam
  How to keep leading zeros with pandas? eeps24 1 6,721 May-20-2020, 07:51 PM
Last Post: deanhystad
  Cancelling 'open directory' leading to crash Fairbz_ 1 2,250 May-08-2020, 03:14 PM
Last Post: DPaul

Forum Jump:

User Panel Messages

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