import hashlib
m = hashlib.md5("hello world!").hexdigest()
print(m)
python 最简单对象
import hashlib
import json
m = hashlib.md5("hello world!").hexdigest()
print(m)
class todoitem:
def __init__(self,mhash,todo,status):
self.mhash = mhash
self.todo = todo
self.status = status
list = []
list.append(todoitem("ada","aga","false").__dict__)
list.append(todoitem("aaa","aaa","false").__dict__)
print(json.dumps(list))