python 2.7中的代码运行良好,但我在python 3.6中得到了日期时间问题: for x in'<=' not supported between instances of 'type' and 'datetime.datetime'在python 3.6中:datetime.datetime(9999, 12, 3
我是Python的初学者,正在尝试编写一个小程序来记录货币的变化。当我尝试使用存储在文件'amount.txt‘中的信息时,出现了一个错误,并声明'TypeError: must be str,not _io.TextIOWrapper’如何解决这个问题,同时仍然使用来自‘umentt.txt’的数据?