[Python] String 인코딩, 디코딩 함수 (encode, decode)


[Python] String 인코딩, 디코딩 함수 (encode, decode)

목차 [Python] String 인코딩, 디코딩 함수 (encode, decode) 이번 포스트에서는 스티링의 문장을 인코딩하거나 디코딩해서 binary(바이너리)로 변경하는 함수에 대해 알아보겠습니다. encode() 와 decode()는 string 내부에 내장된 함수 입니다. encoding에는 많은 종류가 있는데 대표적으로 사용되는 encoding은 아래와 같습니다. utf-8 utf-16 euc-kr ascii Encode, Decode 함수 Syntax Str.encode(encoding='UTF-8',errors='strict') Str.decode(encoding='UTF-8',errors='strict') encoding 속성의 값은 앞서 언급한 encoding 종류를 입력하면 됩니다...


원문링크 : [Python] String 인코딩, 디코딩 함수 (encode, decode)