📅  最后修改于: 2022-03-11 14:45:18.348000             🧑  作者: Mango
# python3
import ast
byte_str = b"{'one': 1, 'two': 2}"
dict_str = byte_str.decode("UTF-8")
mydata = ast.literal_eval(dict_str)
print(repr(mydata))