此函数返回所传递列表的第一个元素。
def head(list): return list[0] print(head([1, 2, 3, 4, 5])) # 1
Copyright© 2013-2020
All Rights Reserved 京ICP备2023019179号-8