Does python support character type?

前端 未结 3 1370
天涯浪人
天涯浪人 2021-01-17 19:21

When I am checking with data types I wonder why a char value is returning as string type.

Please see my input and output.

Input:

<         


        
3条回答
  •  时光取名叫无心
    2021-01-17 19:48

    There is a bytes type which may be analogous depending on why you are asking.

    >>> b'a'
    => b'a'
    

    https://docs.python.org/3/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit

提交回复
热议问题