Trong Python, cú pháp nào sau đây dùng để tạo một danh sách rỗng?

TH10 CĐ5-BH23 Tiết 1

Quiz
•
Information Technology (IT)
•
10th Grade
•
Medium
phutuctran 1
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
list = ()
list = []
list = {}
list = ""
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào sau đây dùng để thêm phần tử vào cuối danh sách?
list.append(x)
list.insert(k, x)
list.add(x)
list.pus(x)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cho danh sách A = [1, 2, 3, 4, 5], câu lệnh A[1] = 10 có tác dụng gì?
Thêm phần tử 10 vào danh sách
Xóa phần tử thứ 2
Thay phần tử thứ 2 thành 10
Lỗi
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào sau đây dùng để xóa phần tử ở vị trí chỉ số 1 trong danh sách?
del list[1]
list.remove(1)
list.delete(1)
list[1] = 0
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Hàm nào sau đây trả về số lượng phần tử trong danh sách?
len(list)
count(list)
length(list)
size(list)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
a = [10, 20, 30, 40]
a.insert(2, 25)
print(a)
Kết quả sau khi thực hiện đoạn mã trên là gì?
[10, 20, 25, 30, 40]
[10, 25, 20, 30, 40]
[10, 20, 30, 25, 40]
[25, 10, 20, 30, 40]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh A.clear() có tác dụng gì?
Xóa danh sách A
Xóa toàn bộ dữ liệu của danh sách A
Sắp xếp danh sách A
Không có lệnh clear()
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Luyện tập

Quiz
•
10th Grade
6 questions
Vòng 3. Kiểu danh sách

Quiz
•
10th Grade
10 questions
PHIẾU HỌC TẬP SỐ 2 - BÀI 10 - TIN HỌC 10

Quiz
•
10th Grade
9 questions
Kiến thức về hàm print() trong Python

Quiz
•
2nd Grade - University
15 questions
BÀI 26: HÀM TRONG PYTHON

Quiz
•
10th Grade
15 questions
Quiz về Kiểu Dữ Liệu List và Set (1)

Quiz
•
7th Grade - University
15 questions
Bài 25

Quiz
•
10th Grade - University
10 questions
Bài 25: Một số lệnh làm việc với xâu kí tự

Quiz
•
10th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
20 questions
Understanding Linear Equations and Slopes

Quiz
•
9th - 12th Grade