Python Data Types
Test your knowledge of Python data types with these MCQs. From the basics of integer, float, and string data types to advanced concepts such as tuple, list, and dictionary data types, our Python Data Types MCQs cover a wide range of topics. Whether you're a beginner learning the fundamentals of data types in Python or an experienced developer looking to reinforce your knowledge, these MCQs will help you master data types in Python and become a proficient Python programmer.
VIDEO
➲ Python Data Types - Quiz
A
Float
B
String
C
List
D
Integer
B
A
Float
B
String
C
List
D
Integer
D
A
Float
B
String
C
List
D
Integer
A
A
Float
B
String
C
List
D
Integer
A
A
List
B
Dictionary
C
Tuple
D
String
A
Answer:
A
Lists are created using square brackets.
List is built-in data types in Python used to store collections of data.
Lists are used to store multiple items in a single variable.
A
List
B
Dictionary
C
Tuple
D
String
A
Answer:
A
Lists are created using square brackets.
List is built-in data types in Python used to store collections of data.
Lists are used to store multiple items in a single variable.
List items are ordered, changeable, and allow duplicate values.
To determine how many items a list has, use the len()
function.
List items can be of any data type.
A list can contain different data types.
A
List
B
String
C
Dictionary
D
Tuple
D
Answer:
D
Tuple is data types in Python used to store collections of data
Tuples are used to store multiple items in a single variable.
A tuple is a collection which is ordered and unchangeable.
Tuples are written with round brackets.
A
List
B
String
C
Dictionary
D
Tuple
B
A
List
B
String
C
Dictionary
D
Tuple
A
A
List
B
Set
C
Dictionary
D
Tuple
C
Answer:
C
Dictionaries are used to store data values in key: value pairs.
A dictionary is a collection which is ordered, changeable and do not allow duplicates.
To determine how many items a dictionary has, use the len() function.
A
List
B
Set
C
Dictionary
D
Tuple
B
Answer:
B
Sets are used to store multiple items in a single variable.
Set is data types in Python used to store collections of data.
A set is a collection which is unordered, unchangeable*, unindexed and uplicates not allowed.
* Note: Set items are unchangeable, but you can remove items and add new items.
A
List
B
String
C
Dictionary
D
Boolean
A
A
List
B
String
C
Dictionary
D
Boolean
D
A
data()
B
type()
C
true()
D
str()
B
A
List
B
String
C
Dictionary
D
Boolean
B
A
List
B
Dictionary
C
Tuple
D
Set
C
A
List
B
Dictionary
C
Tuple
D
Set
D
A
List
B
Module
C
Dictionary
D
Tuple
B
A
Integer
B
String
C
List
D
Float
D
A
Integer
B
List
C
String
D
Float
D
A
List
B
Dictionary
C
Tuple
D
Set
D
A
List
B
Dictionary
C
Tuple
D
Set
B
A
List
B
Dictionary
C
Tuple
D
Set
C
A
List
B
Dictionary
C
Tuple
D
Set
A
A
List
B
Dictionary
C
Tuple
D
Set
B
A
"Python\tis\tEasy\n"
B
"Hello, it's very easy to learn Python"
C
"Python", "easy"
D
"Python is easy'
D
Answer:
D
"Python is easy'
A
undefined
B
Null
C
Nan
D
None
D
A
TypeError
B
String
C
Tuple
D
List
B
A
TypeError
B
String
C
Tuple
D
List
C
A
TypeError
B
String
C
Tuple
D
List
C
A
TypeError
B
Tuple
C
String
D
List
D
A
TypeError
B
String
C
Tuple
D
List
D
A
TypeError
B
String
C
Tuple
D
List
C
A
Tuple
B
Set
C
List
D
Dictionary
D