The last item · Phần tử cuối cùng
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · Trang này cần trình duyệt gần đây (hỗ trợ SharedArrayBuffer). Vui lòng cập nhật Chrome, Edge, Firefox hoặc Safari lên phiên bản mới nhất.
This one builds on a lesson you haven't finished yet. Do that lesson first: · Bài này dựa trên một bài học bạn chưa hoàn thành. Hãy làm bài đó trước:
Python Basics · Python Cơ bản · Functions · Hàm số →
English
The last item
A list keeps items in order. xs[-1] is the last one.
Tiếng Việt
Mục cuối cùng
Một danh sách giữ các mục theo thứ tự. xs[-1] là mục cuối cùng.
Complete last(xs): return the last item of the list xs. Hint: xs[-1]. · Hoàn thành last(xs): trả về phần tử cuối cùng của danh sách xs. Gợi ý: xs[-1].
Click Run to see the output here. · Nhấn Chạy để xem kết quả ở đây.