Dictionary Question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Dictionary Question

I am trying to create a dictionary where the keys will be a number between 1 and another number that is decided through input, like this: dict = {1: value, 2:value, 3, value, etc.......} How do I set it up so that when the number is inputed it creates the range for my keys within the dictionary?

26th Mar 2018, 6:29 PM
Blake Windham
1 Answer
+ 8
You could try something like this (just input a positive integer value, like 30): https://code.sololearn.com/c01lCm21p2A0/?ref=app
26th Mar 2018, 7:10 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar