标签:
def text_create(name, msg):
desktop_path = ‘/Users/Hou/Desktop/‘
full_path = desktop_path + name + ‘.txt‘
file = open(full_path,‘w‘)
file.write(msg)
file.close()
print(‘Done‘)
text_create(‘hello‘,‘hello world‘) # 调用函数
标签:
原文地址:http://www.cnblogs.com/goodright/p/5886188.html