在Python中,您可以通过以下几种方法在一行中输入多个值:
1. 使用逗号分隔:
a, b, c = map(int, input().split(','))
2. 使用空格分隔:
a, b, c = map(int, input().split())
或者使用列表推导式:
a, b, c = [int(x) for x in input().split()]
3. 如果您想将输入的值作为字符串处理,可以这样写:
a, b, c = input().split(',')
或者
a, b, c = input().split()
请根据您的具体需求选择合适的方法