Để xóa tất cả các phần tử trong danh sách ta dùng hàm gì?

bài 23. 1 số lệnh làm việc với dữ liệu dsach

Quiz
•
Information Technology (IT)
•
Professional Development
•
Medium
Vũ Hân
Used 4+ times
FREE Resource
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
append()
pop()
clear()
remove()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Muốn xóa một phần tử từ danh sách ta dùng lệnh gì?
remove()
insert()
append()
clear()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Sau khi thực hiện các câu lệnh sau, mảng A như thế nào?
>>> A = [1, 2, 3, 4, 5]
>>> A.remove(2)
>>> print(A)
[1, 2, 3, 4]
[2, 3, 4, 5]
[1, 2, 4, 5]
[1, 3, 4, 5]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Phần tử có chỉ số bao nhiêu trong mảng A bị xoá?
>>> A = [10, 20, 3, 30, 20, 30, 20, 6, 3, 2, 8, 9]
>>> A.remove(3)
>>> print(A)
2
3
8
4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Muốn xóa phần tử có chỉ số 2 trong danh sách a ta dùng lệnh gì?
del(2)
del a[2]
del a
remove(2)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Danh sách A trước và sau lệnh insert() là [1, 3, 5, 0] và [1, 3, 4, 5, 0]. Lệnh đã dùng là lệnh gì?
insert(2, 4)
insert(4, 2)
insert(3, 4)
insert(4, 3)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Muốn gọi đến phần tử đầu tiên trong danh sách a ta dùng lệnh gì?
a.[1]
a[0]
a.0
a[]
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
QUIZ SOBRE TECNOLOGIA

Quiz
•
Professional Development
20 questions
HyQuizz_Mùa 3_Day 2

Quiz
•
Professional Development
20 questions
DCSMAT-DataStructures-Condititonal-iterative

Quiz
•
Professional Development
20 questions
Topic 1 Question 521 to 540

Quiz
•
Professional Development
20 questions
Intrebari HTML CSS

Quiz
•
Professional Development
20 questions
Topic 1 Question 161 to 180

Quiz
•
Professional Development
20 questions
Topic 1 Question 201 to 220

Quiz
•
Professional Development
20 questions
Understanding HTML

Quiz
•
Professional Development
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade