Python Forum
Zfill Method Parameter Confusion
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Zfill Method Parameter Confusion
#3
Can drop filling in zeros and it will still work.
>>> chr(int(u.lstrip("U+"), 16))
'𐍆'

>>> u = 'U+1F496'
>>> chr(int(u.lstrip("U+"), 16))
'💖'

>>> u = 'U+1F47D'
>>> chr(int(u.lstrip("U+"), 16))
'👽'

>>> u = "U+1f4af"
>>> chr(int(u.lstrip("U+"), 16))
'💯'

>>> u = 'U+1F389'
>>> chr(int(u.lstrip("U+"), 16))
'🎉'

# Using name
>>> '\N{Party Popper}'
'🎉'
Reply


Messages In This Thread
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 924 Mar-24-2023, 06:59 PM
Last Post: tester_V
  [ERROR] ParamValidationError: Parameter validation failed: Invalid type for parameter gdbengo 3 11,196 Dec-26-2022, 08:48 AM
Last Post: ibreeden
  sqlite3 question - execute method with :parameter richalt2 2 7,522 May-20-2019, 05:35 PM
Last Post: woooee
  Input as not default method parameter dan789 4 2,965 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