嗨伙计们这是我的内容.json文件
[{"content": "Let\u2019s go home \n\u00a0\nNow", "channel_id": "423266223960096770", "mentions": [], "type": 0}]
这是我的代码.py你知道吗
with open('content.json', 'r') as current_stuff:
before = json.loads(current_stuff.read())
before_set = []
for b in before:
before_set.append(b['content'])
setx = str(before_set)
string9 = str(''.join( c for c in setx if c not in "[{'}]" ))
print (string9)
打印输出:
Let’s go home \n\xa0\nNow
我要像这样打印出来
Let’s go home
Now
当我这么做的时候:
print ("Let\u2019s go home \n\u00a0\nNow")
我怎样才能解决这个问题?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐