title: How to get input for each varible in list using loop in python
body: <p>I want it to ask &quot;enter not green cost for Jan&quot; and then after input ask for Feb and so on. I could so it one by 1 but is there a way to make it reiterate the question with a loop while going onto the next month each time?</p>
  <pre><code>months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
  def main():
      get_notgreen()
  
  def get_notgreen():
      not_green = [] * 12
      for x in range(1,12):
          not_green.append(input(f'Enter not green cost for {months[0]}:'))
          
          print(not_green)
  
  main()
  </code></pre>