Phương thức String decode() trong Python
[Pages:4]
Copyright ?
Phng thc String decode() trong Python
Mi?u t
Phng thc decode() Gii m? chui bi s dng encoding ? cho.
C? ph?p
Str.decode(encoding='UTF-8',errors='strict')
Chi tit v tham s:
encoding -- ?y l? encodings c s dng.
errors -- Tham s n?y c? th c cung cp thit lp mt tr?nh x l? li kh?c. Mc nh cho li l? 'strict', ngha l? c?c li li?n quan ti m? h?a s to mt UnicodeError. Mt s gi? tr kh?c l? 'ignore', 'replace', 'xmlcharrefreplace', 'backslashreplace' ...
Tr v gi? tr
Tr v chui ? c gii m?.
Chng tr?nh Python v? d
Str = "vi du Python ve chuoi!!!"; Str = Str.encode('base64','strict');
print "Chuoi duoc ma hoa la: " + Str print "Chuoi sau khi giai ma la: " + Str.decode('base64','strict')
Kt qu l?:
Chuoi duoc ma hoa la: dmkgZHUgUHl0aG9uIHZlIGNodW9pISEh
Chuoi sau khi giai ma la: vi du Python ve chuoi!!!
Trang chia s c?c b?i hc online min ph?
Page 1
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- useful python odds and ends online data string functions
- unicode in python
- phương thức string decode trong python
- overcoming frustration correctly using unicode in python
- pattern matching and text manipulation bram kuijper
- programming with unicode documentation
- python data persistence tutorialspoint
- python string code rxjs ggplot2 python data