How do I create lists out of dictionary, having same name as dictionary keys and same size as value of that key?
<p>In Python, Suppose there is a dictionary named fruits:</p>

<pre><code>fruits={
"apple":5,
"orange":7,
"mango":9
}
</code></pre>

<p>On reading the dictionary items, it should create 3 lists having same name as dictionary keys viz. apple, orange and mango and size of theses lists should be 5, 7 and 9 respectively.
The elements of these lists should be given from the user through console.</p>

<p>Got a solution for this-</p>

<pre><code>fruit = {
    "apple": 5,
    "banana" : 10
}
for key in fruit.items():
    key = list(fruit.get(key)*[None]) 
</code></pre>

<p>This will serve my need.</p>

python list python-3.x dictionary