企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` import json f = open('1017.txt','r',encoding='utf-8') m = json.load(f) list1 = m['data']['resultList'] for (index,i) in enumerate(list1): print(index+1,i['title']) ``` ``` import json f = open('10172.txt','r',encoding='utf-8') m = json.load(f) list1 = m['data']['recommend']['resultList'] for (index,i) in enumerate(list1): print(index+1,i['name']) ``` ``` import json import random list2 = [] f = open('10173.txt','r',encoding='utf-8') m = json.load(f) list1 = m['data']['recommend']['resultList'] for (index,i) in enumerate(list1): list2.append(i['name']) print(index+1,i['name']) print(list2) random.shuffle(list2) print(list2) ``` ``` import json import random list2 = [] f = open('10174.txt','r',encoding='utf-8') m = json.load(f) list1 = m['data']['resultList'] for (index,i) in enumerate(list1): list2.append(i['title']) print(index+1,i['title']) print(list2) random.shuffle(list2) print(list2) ```