我正在尝试将字典写到txt文件中。然后通过使用raw_input键入密钥来读取dict值。我觉得我只是错过了一步,但我已经寻找了一段时间。name.py", line 24, in readingTypeError: string indices must be integers, not strfrom sys import exit
我有以下用于查询和保存json响应的代码。查询返回一个json输出,但是当我用代码保存它时,我就不能再保留json格式了。file_out='C:\\Users\\ayush488\\Desktop\\annotation_for_new_dataset\\url'+str(cnt)+'.txt' with open(file_o