Heim > Fragen und Antworten > Hauptteil
1 2 3 4 5 |
|
这段代码在python2.7下面通过,但是python3.5会报错:
TypeError: 'str' does not support the buffer interface
更改为这样以后,python3可以通过了
1 2 3 4 5 |
|
但是python2又会报错:TypeError: str() takes at most 1 argument (2 given)
该怎样修改才能使代码在python2和python3都运行通过呢?
代言2016-11-09 14:10:41
1 2 3 4 5 6 7 8 9 |
|
三叔2016-11-09 14:10:28
1 2 3 4 5 6 7 8 9 10 11 |
|