After a long time of trial and error, I came to know the difference between python2.X and python3.X,
The principle is to use the map function, but the information returned by the two is different
Python2.x, you can use the map function
list=[] # empty list
1
|
list
=
map
(
int
, list) 或者
|
If it is 3.x, map returns a map object, which of course can also be converted to List:
1
|
list
=
list
(
map
(
float
, list))
|
So here needs to be treated differently;