
Python Lists, Tuples, Dictionaries, and Sets Quiz

Quiz
•
Engineering
•
University
•
Medium
Vidya Bhosale
Used 1+ times
FREE Resource
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to create a list in Python?
list = {}
list = ()
list = []
list = <>
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the first element of a list my_list?
my_list[0]
my_list[1]
my_list(-1)
my_list.first()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of len([1, 2, 3, 4])?
3
4
5
Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of [1, 2, 3] + [4, 5]?
[1, 2, 3, 4, 5]
[5, 7, 8]
Error
None
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does my_list[1:3] do?
Returns 1st and 3rd elements
Returns a list with elements at index 1 and 2
Returns all elements except 1 and 3
Syntax error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to add an element to a list?
add()
append()
insert()
push()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of list("abc")?
"abc"
["abc"]
['a', 'b', 'c']
{'a','b','c'}
Create a free account and access millions of resources
Similar Resources on Wayground
50 questions
Round 1 STARBURST START

Quiz
•
University
50 questions
ILMU UKUR TANAH

Quiz
•
University
55 questions
OKR124

Quiz
•
University
55 questions
PRESSURE CHANGE MEASUREMENT TESTING METHOD I

Quiz
•
7th Grade - University
50 questions
Quiz on c program

Quiz
•
University
50 questions
Wipro Training Exception Handling and JDBC

Quiz
•
University
50 questions
PHP Array and String MCQs

Quiz
•
University
50 questions
C Programming Quiz

Quiz
•
University
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