擅长:python、mysql、java
<p>[更新]我添加了str函数,将其作为字符串写入,并关闭文件以确保它立即执行此操作,然后我必须终止程序,以便将内容写入</p>
<pre><code> import uuid
def main():
a=input("What's your name?")
print(uuid.uuid1())
main()
f=open("file.txt","w")
f.write(str(uuid.uuid1()))
f.close()
</code></pre>
<p>我想这对我有用</p>