def nth_item(item_list, n, reverse=False):
if reverse:
n = len(item_list) - n + 1
y=item_list[n-1]
else:
y=item_list[n-1]
return y
|
楼主: 番茄奏鸣曲
|
5514
7
[问答] python def 返回值问题 |
|
硕士生 60%
-
|
30论坛币
最佳答案 | |
|
|
| ||
| ||
| ||
| ||
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


