How to get size of string in bytes in Python ? 1. 2. string1 = "Canada". print ( len (string1.encode( 'utf-16' ))). Output.
確定! 回上一頁