Python ProgrammingPython Programming

How to get size of string in bytes in Python

string1 = "Canada"
print(len(string1.encode('utf-16')))
Output
10