码迷,mamicode.com
首页 > 编程语言 > 详细

Python返回多个值

时间:2018-07-20 11:26:56      阅读:107      评论:0      收藏:0      [点我收藏+]

标签:ret   get   nbsp   bsp   abc   返回   turn   code   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

 

Python返回多个值

标签:ret   get   nbsp   bsp   abc   返回   turn   code   python   

原文地址:https://www.cnblogs.com/suhfj-825/p/9339532.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!