main.py
Costs 1 credit
加载编辑器中...
输出 Output执行成功
[错误提示] 检测到中文全角符号(如 ( ) , : ;),Python 语法可能无法解析。 请改成英文半角符号:( ) , : ;
Terminal (Simulated)Install commands are simulated only, no real network requests
$
Step 1: 解析模拟响应
先把 JSON 字符串解析成 Python 字典,再读取 data 内的用户信息。
Self-Check List
- 导入 json 模块
- 解析 JSON 字符串
- 输出用户名
Transfer Template
import json
mock_response = """{"status": 200, "data": {"name": "Alice", "level": "gold"}}"""After completing this step, you should be able to independently explain and reproduce this concept, then apply it to similar problems.