Chen-Chih Tutorial page + SQA
Software Testing Setting and note
Pages
Home
Content
Introuction
My Writting_My story
GIT
Saturday, April 18, 2020
Unicode and decode python
Python2 uses str, but in python3 it uses byte.
str
can be encoded into
bytes
using the
encode()
method.
bytes
can be decoded to
str
using the
decode()
method.
Reference
https://medium.com/better-programming/strings-unicode-and-bytes-in-python-3-everything-you-always-wanted-to-know-27dc02ff2686
you can use type(var) to see what type is it.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment