1
1
1Tima12019-09-11 21:47:23
Python
1Tima1, 2019-09-11 21:47:23

Returning a unicode number?

explain the difference
The len string function counts the number of Unicode characters, not bytes.
The len() function returns the number of bytes since ds is a variable bytes
snowman = '\u2603'
ds =snowman.encode('utf-8')
len(ds)
3

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question