<
RHD
/>
Home
Blog
Quiz
Resources
About
Contact
// guest
▾
Login
Request Account
[ light ]
// Data Structures
Data Structures Quiz
// question 1 of 10
What is printed? print(""a"" in [""a"",""b""])
True
a
False
// question 2 of 10
What is printed? a=[1,2,3]
[3,2,1]
a.reverse()
print(a)
// question 3 of 10
What is a tuple?
A set of keys
An ordered immutable collection
A mutable list
// question 4 of 10
What is a list?
A key-value structure
An ordered mutable collection
An immutable collection
// question 5 of 10
What is printed? print({x for x in [1,1,2]})
{1,1,2}
{1,2}
[1,2]
// question 6 of 10
What is a nested list?
A dictionary key
A tuple in a set
A list inside another list
// question 7 of 10
What is printed? print({x:x*x for x in range(3)})
[0,1,4]
{1,4}
{0:0,1:1,2:4}
// question 8 of 10
What does keys() return?
Dictionary values
Dictionary keys
Sorted items
// question 9 of 10
What is printed? print(len((1,2,3,4)))
5
3
4
// question 10 of 10
What is printed? a=[1,2,3]
[1,2]
[2,3]
print(a[:2])
Submit Answers →