
Mastering Python Lists
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Easy
Nicolas Homsi
Used 4+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method is used to add an item to a list in Python?
push
add
insert
append
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you remove an item from a list by value?
Use list.remove(value) to remove an item by value.
Use del list[value] to remove an item by value.
Use list.pop(value) to remove an item by value.
Use list.delete(value) to remove an item by value.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax to join two lists in Python?
list1.merge(list2)
list1.append(list2)
list1 * list2
list1 + list2 or list1.extend(list2)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain how to create a copy of a list in Python.
copied_list = original_list[]
copied_list = list(original_list)
You can create a copy of a list in Python using slicing: copied_list = original_list[:].
copied_list = original_list.copy()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: list1 = [1, 2, 3]; list2 = list1.copy(); list2.append(4)?
[1, 2, 3, 4, 5]
[1, 2, 3]
[1, 2, 3, 4]
[4, 1, 2, 3]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you iterate over a list using a for loop?
for item in my_list:
my_list.forEach(item => { });
for each item in my_list:
for item in range(len(my_list)) :
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between 'append()' and 'extend()' methods in a list?
append() adds multiple elements; extend() adds one element.
append() removes an element; extend() replaces the list.
append() can only be used with strings; extend() can be used with any data type.
append() adds one element; extend() adds multiple elements from an iterable.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Code.org Lesson 1-14
Quiz
•
9th - 12th Grade
20 questions
Python básico
Quiz
•
9th - 12th Grade
11 questions
Access
Quiz
•
10th Grade - University
10 questions
Python Alternating Turns
Quiz
•
7th - 12th Grade
10 questions
Lesson 01 Unit 1 Excel 2019/365 MOAC
Quiz
•
9th - 12th Grade
20 questions
Google SketchUp Tool
Quiz
•
KG - University
10 questions
Microsoft Teams
Quiz
•
KG - 12th Grade
15 questions
Unbound Report Quiz
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
