Which of the following data types is used to represent a sequence of Unicode characters that can be modified?
A:
int
B:
float
C:
str
D:
bytearray
Answer:D
The bytearray data type is used to represent a sequence of Unicode characters that can be modified. It is similar to the bytes data type, but it can be modified.
Discuss About this Question.
Which of the following data types is used to represent a sequence of Unicode characters?
A:
int
B:
float
C:
str
D:
bool
Answer:C
The str data type is used to represent a sequence of Unicode characters, such as a string of text.
Discuss About this Question.
Which of the following data types is used to represent a group of related elements that can be accessed using a single variable?
A:
List
B:
Tuple
C:
Set
D:
Dictionary
Answer:D
Dictionaries are used to represent a group of related elements that can be accessed using a single variable. Each element is accessed using a unique key that identifies it within the dictionary.
Discuss About this Question.
Which of the following data types is used to represent a collection of elements in a specific order with duplicates allowed and with the ability to add or remove elements?
A:
List
B:
Tuple
C:
Set
D:
Dictionary
Answer:A
Lists are used to represent a collection of elements in a specific order with duplicates allowed and with the ability to add or remove elements.
Discuss About this Question.
Which of the following data types is used to represent a single, immutable element?
A:
List
B:
Tuple
C:
Set
D:
Dictionary
Answer:B
Tuples are used to represent a single, immutable element in Python. They are similar to lists, but tuples cannot be modified once they are created.
Discuss About this Question.
Ad Slot (Above Pagination)
Install ExamAdept
Fast access — add this app to your device.
To install on iPhone/iPad: tap Share → Add to Home Screen.
Discuss About this Question.