Y
Hacker News
new
|
ask
|
show
|
jobs
by
fireflies_
1955 days ago
Yes, you can can replace that with the magic number 49 if you want, ord('1') == 49 because ord returns the unicode code point for a character.
Documentation is here for the curious:
https://docs.python.org/3/library/functions.html#ord