<
RHD
/>
Home
Blog
Quiz
Resources
About
Contact
Enlist
// guest
▾
Login
Request Account
[ light ]
// Data Structures
Data Structures Quiz
// question 1 of 10
What is printed? d={""a"":1}
[1]
dict_values([1])
print(d.values())
// question 2 of 10
What is printed? d={""a"":1,""b"":2}
del d[""a""]
{""b"":2}
print(d)
// question 3 of 10
What is a comprehension?
Compact way to build collections
A loop error
A file method
// question 4 of 10
What is printed? print([1,2,3][-1])
1
3
2
// question 5 of 10
What is a nested list?
A dictionary key
A list inside another list
A tuple in a set
// question 6 of 10
What does readlines() return?
String
List of lines
Integer
// question 7 of 10
What is printed? a=[1,""hi"",True]
hi
True
print(a[1])
// question 8 of 10
What is printed? print((1,2)+(3,4))
(1,2,3,4)
(4,6)
Error
// question 9 of 10
What is printed? print(tuple([1,2,3]))
{1,2,3}
[1,2,3]
(1,2,3)
// question 10 of 10
What mode appends to a file?
r
a
w
Submit Answers →