Giả sử có một list: l = [2,3,4]. Nếu muốn in list này theo thứ tự ngược lại ta nên sử dụng phương pháp nào sau đây?

Giả sử có một list: l = [2,3,4]. Nếu muốn in list này theo thứ tự ngược lại ta nên sử dụng phương pháp nào sau đây?

A. reverse(l)

B. list(reverse[(l)])

C. reversed(l)

D. list(reversed(l))

Hướng dẫn

Chọn D là đáp án đúng

 

Thư viện tài liệu12 Tháng bảy, 2023 @ 2:33 chiều

Đánh giá chủ đề này
How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site