Comparing numerical input in python list : <p>Trying to create a list. </p>

<pre><code>n = 0
while n = 0:
number = int(input ("What number of groceries do you wish to purchase?"))
</code></pre>

<p>is there some way I can write a code that asks the user what groceries they want based on what number the user inputs. </p>

<p>Something like</p>

<pre><code>while number = int(1,20):
    print ("What grocery would you like to purchase?")
</code></pre>

<p>only that wouldn't print it that many times...</p>
