Use the slicing syntax list[::step] with len(list)-1 as step to return a new list containing the first and last element of list . print(a_list). Output. [1, ...
確定! 回上一頁