Question
In python, create a big dictionary, d, with keys from 0 to 99, where all keys have initial value of 'a', i.e.: d = {0:'a', 1:'a', 2:'a',..., 99:'a'}
Answer
d = dict().fromkeys(range(100), 'a')
Question
In python, create a big dictionary, d, with keys from 0 to 99, where all keys have initial value of 'a', i.e.: d = {0:'a', 1:'a', 2:'a',..., 99:'a'}
Question
In python, create a big dictionary, d, with keys from 0 to 99, where all keys have initial value of 'a', i.e.: d = {0:'a', 1:'a', 2:'a',..., 99:'a'}
Answer
d = dict().fromkeys(range(100), 'a')
If you want to change selection, open document below and click on "Move attachment"
pdf
owner:
kkhosravi - (no access) - PYTHON_DATA_STRUCTURES_AND_ALGORITHMS.pdf, p54
Summary
status | not learned | | measured difficulty | 37% [default] | | last interval [days] | |
---|
repetition number in this series | 0 | | memorised on | | | scheduled repetition | |
---|
scheduled repetition interval | | | last repetition or drill | | | | |
---|
Details
No repetitions