a,b,c=map(int,input('学号,姓名,专业').split())
时间: 2023-12-21 19:03:03 浏览: 32
Sorry, as an AI language model, I cannot input anything. However, I can show you how to use the map function to get multiple inputs in a single line of code in Python.
Here's an example:
a, b, c = map(str, input('Enter your student ID, name, and major separated by spaces: ').split())
In this example, we are getting three inputs (student ID, name, and major) from the user in a single line of code using the input() function. We then use the split() function to split the input into a list of strings based on the space character. Finally, we use the map() function to convert each string in the list to a string data type (since we are not specifying any other data type). The result is three variables (a, b, c) with the corresponding input values.
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.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)