Python Lists Methods

Quiz
•
Computers
•
11th Grade
•
Hard
Thomas Martinez
FREE Resource
28 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following list assignment
aList = [4, 8, 12, 16]
aList[1:4] = [20, 24, 28]
print(aList)
[4, 20, 24, 28, 8, 12, 16]
[4, 20, 24, 28]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following list operation
aList = [10, 20, 30, 40, 50, 60, 70, 80]
print(aList[2:5])
print(aList[:4])
print(aList[3:])
[20, 30, 40, 50]
[10, 20, 30, 40]
[30, 40, 50, 60, 70, 80]
[30, 40, 50]
[10, 20, 30, 40]
[40, 50, 60, 70, 80]
None of these
3.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Select all the correct options to join two lists in Python
listOne = ['a', 'b', 'c', 'd']
listTwo = ['e', 'f', 'g']
newList = listOne + listTwo
newList = extend(listOne, listTwo)
newList = listOne.extend(listTwo)
newList.extend(listOne, listTwo)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following
aList = [5, 10, 15, 25]
print(aList[::-2])
[15, 10, 5]
[10, 5]
[25, 10]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following list function?
sampleList = [10, 20, 30, 40, 50]
sampleList.append(60)
print(sampleList)
sampleList.append(60)
print(sampleList)
[10, 20, 30, 40, 50, 60]
[10, 20, 30, 40, 50, 60, 60]
[10, 20, 30, 40, 50, 60]
[10, 20, 30, 40, 50, 60]
both are wrong
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, list is mutable
False
True
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following would give an error?
list1=[]
list1=[]*3
list1=[2,8,7]
None of the above
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Senior - Python Assessment 1

Quiz
•
9th - 12th Grade
26 questions
Python middle

Quiz
•
8th Grade - University
33 questions
Sem-01(C)

Quiz
•
9th - 12th Grade
27 questions
تمارين بايثون للمسار الفني والمهني تقن 806 / 804

Quiz
•
10th Grade - University
27 questions
Excel Chapter 1 Basic Terminology

Quiz
•
9th - 12th Grade
25 questions
Python Conditional Statements

Quiz
•
9th - 12th Grade
31 questions
Python Lists

Quiz
•
8th Grade - University
24 questions
HK2- Thi Tin Học

Quiz
•
11th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade