技能树里的,为什么啊
# -*- coding: UTF-8 -*-
def init():
# TODO(You): 实现初始化
def set(dict, key, value):
# TODO(You): 实现初始化
def get(dict, key):
# TODO(You): 实现获取接口
def exist(dict, key):
# TODO(You): 实现判断接口
if __name__ == '__main__':
dict = init()
for i in range(10):
key = "key_{}".format(i)
value = i
set(dict, key, value)
test_key = "key_4"
if exist(dict, test_key):
test_value = get(dict, test_key)
print("key is: {}, value is: {}".format(test_key, test_value))