Python Forum
Zfill Method Parameter Confusion
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Zfill Method Parameter Confusion
#2
16 is a second argument to int(). It is assumed that the string contains hexadecimal characters and it is converted to int in base 16. For example
>>> int("000002A3", 16)
675
>>> chr(int("000002A3", 16))
'ʣ'
>>> '\N{LATIN SMALL LETTER DZ DIGRAPH}'
'ʣ'
for the character 'LATIN SMALL LETTER DZ DIGRAPH'
Reply


Messages In This Thread
RE: Zfill Method Parameter Confusion - by Gribouillis - Nov-25-2022, 07:18 PM
RE: Zfill Method Parameter Confusion - by snippsat - Nov-26-2022, 01:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  zfill prints extra et the end of a var tester_V 4 961 Mar-24-2023, 06:59 PM
Last Post: tester_V
  [ERROR] ParamValidationError: Parameter validation failed: Invalid type for parameter gdbengo 3 11,394 Dec-26-2022, 08:48 AM
Last Post: ibreeden
  sqlite3 question - execute method with :parameter richalt2 2 7,597 May-20-2019, 05:35 PM
Last Post: woooee
  Input as not default method parameter dan789 4 3,028 Mar-08-2019, 09:04 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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