
List,Tuples,Dictionary

Quiz
•
Engineering
•
Professional Development
•
Hard
geet s
Used 2+ times
FREE Resource
19 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Elements of a tuple can be accessed in the same way as list or string using
Indexing
Slicing
Both indexing and slicing
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
init_tuple = ('Python') * 3
print(type(init_tuple))
A. <class ‘tuple’>
B. <class ‘str’>
C. <class ‘list’>
D. <class ‘function’>
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the below Python code?
a = {(1,2):1,(2,3):2}
print(a[1,2])
A. Key Error
B. {(2,3):2}
C. 1
D. {(1,2):1}
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
The code below has a Python function writing to a dictionary. What will it print in the end?
A. 1
B. 2
C. 3
D. 4
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output of the Python code given below?
dict = {'c': 97, 'a': 96, 'b': 98}
for _ in sorted(dict):
print (dict[_])
A. 96 98 97
B. 96 97 98
C. 98 97 96
D. NameError
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
>>colors = ["red", "green", "burnt sienna", "blue"]
>> "yellow" in colors
What is the result of the yellow in colors expression?
ValueError: 'yellow' is not in list
4
3
False
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What’s the main difference between Python lists and tuples?
Lists can hold any data type and tuples can only contain int and str objects.
Lists are immutable and tuples are mutable.
Lists are faster and tuples are slower.
Lists are mutable and tuples are immutable.
Create a free account and access millions of resources
Similar Resources on Wayground
16 questions
Mastering Python Concepts

Quiz
•
Professional Development
20 questions
DATA SCIENCE 4

Quiz
•
Professional Development
14 questions
Security Hardening, Secure Boot and AD

Quiz
•
Professional Development
20 questions
EXAMEN FINAL MODULO 02 CIRCUITOS DE VENTILACIÓN

Quiz
•
Professional Development
20 questions
Quiz JPM Industry

Quiz
•
Professional Development
20 questions
WPS Interpretation 2025

Quiz
•
Professional Development
15 questions
Java Networking Fundamentals

Quiz
•
Professional Development
15 questions
PA_Datatypes_Indentations2

Quiz
•
Professional Development
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

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

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade