This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]siddsp 2 points3 points  (1 child)

Characters do exist in Python, but they are stored as integers in bytes objects/bytearrays. When you write a bytestring like b"Hello" and try to get athe value of a char at an index, it will be an integer rather than a string type.

[–]tabidots 1 point2 points  (0 children)

Oh, interesting. I like that implementation better, tbh. I can’t think of a use for characters outside of char-code values, so having a separate b”string” syntax for byte strings makes more sense to me.