
Python Quiz: Lists, Dicts, Sets, and More

Quiz
•
Computers
•
2nd Grade
•
Hard
Beebi Naseeba
FREE Resource
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of print([1, 2, 3] + [4, 5, 6])?
[1, 2, 3, 4, 5, 6]
[5, 7, 9]
[4, 5, 6, 1, 2, 3]
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does list1.append(5) do?
Adds 5 to the end of list1
Inserts 5 at index 0
Deletes index 5
Raises an error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of print(len([1, [2, 3], 4]))?
3
4
5
2
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you remove an element from a list by value?
list.remove(value)
list.delete(value)
list.pop(value)
del list[value]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of list1 = [1, 2, 3] and list1 * 2?
[1, 2, 3, 1, 2, 3]
[1, 2, 3, 2]
[1, 2, 3, 1]
[2, 4, 6]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of dict1 = {'a':1, 'b':2}; print(dict1['a'])?
'a'
1
2
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you get all the keys of a dictionary?
dict.keys()
dict.values()
dict.items()
dict.get()
Create a free account and access millions of resources
Similar Resources on Wayground
50 questions
XIRPL2_PASQUIZZ

Quiz
•
1st Grade - Professio...
50 questions
Tryout LSP Pemrograman Dasar

Quiz
•
1st - 3rd Grade
45 questions
GCSE Python Legends

Quiz
•
1st - 12th Grade
52 questions
Ulangkaji ASK Ting 2 Bab 3.1 Persekitaran Kod Arahan

Quiz
•
1st - 12th Grade
50 questions
CAT - Gr 10 - Hardware & Software

Quiz
•
KG - University
45 questions
2EL COMPUTERS

Quiz
•
2nd Grade
51 questions
ask tingkatan 2

Quiz
•
1st - 2nd Grade
50 questions
UAS APOTEKER

Quiz
•
1st - 3rd Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade