RosettaCodeData/Task/String-length/Python/string-length-8.py

6 lines
141 B
Python
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
# The letter Alef
print(len('\u05d0'.encode())) # the default encoding is utf-8 in Python3
# 2
print(len('\u05d0'.encode('iso-8859-8')))
# 1