Python返回多个值

1 def get_abc():
2     a = 1
3     b = 2
4     c = 3
5     return a,b,c
6 
7 temp = get_abc() #temp = (1,2,3)
8 a,b,c = get_abc() #a = 1,b = 2,c = 3

猜你喜欢

转载自www.cnblogs.com/suhfj-825/p/9339532.html