NEW
Font size
WorksheetsLesson 44 - Dictionary Datatype 2
Total questions: 10
Worksheet time: 5mins
Which python datatype is having key value pair ?
Dictionary
set
tuple
string
Which of the following is true ?
Dictionary keys are unique
Dictionary keys can have more than one value
Dictionary can have values without having key
none
What will be the output of the following code ?
x={}
print(type(x))
Dictionary
set
list
tuple
Which of the following python datatype encloses with {} ?
Dictionary
list
set
Both set and dictionary
By default python input is of type -
string
int
float
list
Which function is used to copy one dictionary into another ?
copy()
duplicate()
smaple()
Dictionary can't be copied
Which keyword is used to delete particular key from dictionary ?
del
clear
extern
none
Which function in dictionary is used to delete the last inserted element ?
pop()
popitem()
remove()
discard()
Which dictionary function is used to delete as per the given key ?
pop()
popitem()
delete()
discard()
d={'rahul': 75, 'ritesh': 80, 'risav': 90}
How will you access 80 from the given dictionary ?
d['ritesh']
d[1]
d[2]
d[:2:]
