打了一个python的查字典代码
def kv_get(data,key) -> str:
return data[key]
在mind+的python里能运行,于是我把这串代码复制到ccw的python里,结果
• [Python] eval python error: Traceback (most recent call last):
File "/project/new_file.py", line 27, in kv_get
return data[key]
TypeError: string indices must be integers
为什么?