3 ms·
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
by fireflies_ 6y 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 https://docs.python.org/3/library/functions.html#ord