-1
进出口运行的Python 2.7如何将这个输出保存到Python中的文本文件中?
import requests
count = 1000
while count <= 10000:
count += 1
user = requests.get("https://api.roblox.com/Users/" + str(count)).json() ['Username']
print (user)
谢谢!
fo = open(“foo.txt”,“wb”) fo.write(user) –
@OmidCompSCI和'fo.close()' – user2728397
@Rakesh_K正确。 –