<
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? print(5 in [1,2,3])
5
False
True
// question 2 of 10
What is printed? print(list((1,2,3)))
[1,2,3]
(1,2,3)
{1,2,3}
// question 3 of 10
What is printed? with open(""a.txt"",""w"") as f: print(f.mode)
a
w
r
// question 4 of 10
What is printed? print(type(()))
<class 'dict'>
<class 'tuple'>
<class 'list'>
// question 5 of 10
What is printed? print({1,2}.union({2,3}))
{1,2,3}
{1,2,2,3}
{2}
// question 6 of 10
What is printed? d={""a"":1}
dict_values([1])
print(d.values())
[1]
// question 7 of 10
What is printed? print([1,2,3][0])
2
3
1
// question 8 of 10
What does values() return?
List indexes
Dictionary values
Dictionary keys
// question 9 of 10
What is printed? a=[1,2,3]
print(a)
a.reverse()
[3,2,1]
// question 10 of 10
What is printed? print([x+1 for x in [1,2,3]])
[1,2,3]
[1,4,9]
[2,3,4]
Submit Answers →