Str.encode will return encode string in different given codecs.

Syntax of Str.encode:

encode(encoding=’utf-8′, errors=’strict’)

encoding format can any of the codecs in python utf8,utf32,cp273 etc.

In example given below it encodes string in utf32 format.

string encode in python
Str.encode

 

By SC

One thought on “Str.Encode”

Leave a Reply

Your email address will not be published. Required fields are marked *