Day10 做業

寫一個函數將一個指定的列表中的元素逆序( 如[1, 2, 3] -> [3, 2, 1])(注意:不要使 表自帶的逆序函數)app def reverse_list(list1: list): for index in range(0, len(list1)//2): list1[index], list1[len(list1)-1 - index] = list1[len
相關文章
相關標籤/搜索