To convert string to bytes in Python 3, you can use the encode() function from the string class. For example,
>>> s = u"HellΘ WΘrld" >>> s.encode('utf-8') 'Hell\xce\x98 W\xce\x98rld'
To convert string to bytes in Python 3, you can use the encode() function from the string class. For example,
>>> s = u"HellΘ WΘrld" >>> s.encode('utf-8') 'Hell\xce\x98 W\xce\x98rld'