my2 = list(map(int, my3)) TypeError: 'list' object is not callable
时间: 2024-04-23 11:06:45 浏览: 16
This error occurs when you try to call a list as if it were a function. This can happen if you accidentally use parentheses instead of square brackets when indexing a list, or if you accidentally overwrite a list variable with a function of the same name.
In this specific case, it looks like you are trying to apply the `map()` function to a list called `my3`, but instead of using square brackets to access the list elements, you are using parentheses. This causes Python to interpret `my3` as a function, which it is not.
To fix this error, make sure you are using square brackets to access list elements, like this:
```
my2 = list(map(int, my3))
```
If you are still getting the error, check that you have not accidentally overwritten the `list` function with a variable of the same name. You can check this by typing `print(list)` in your code and seeing if it returns `<class 'list'>`.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)