python报错 OSError: [Errno 22] Invalid argument

问题:

Windows下,以w的模式打开文件报错
OSError: [Errno 22] Invalid argument: '选题结果2019:04:15:04:27:29.xlsx'

错误原因:

windows下文件的命名规范
文件名不允许使用的字符有: < > / \ | : " * ?

你可能感兴趣的:(pytho)