title: Creating a list with inputs prompted by the user?
body: <p>I'm a beginner and taking an intro Python course. The first part of my lab assignment asks me to create a list with numbers entered by the user. I'm a little confused. I read some other posts here that suggest using "a = [int(x) for x in input().split()]" but I'm not sure how to use it or why, for that matter. The code I wrote before based on the things I've read in my textbook is the following: </p>
  
  <pre><code> while True: 
    num = int(input('Input a score (-99 terminates): ')) 
     if num == -99: 
     break
  </code></pre>
  
  <p>Here's the problem from the professor: </p>
  
  <blockquote>
    <p>Your first task here is to input score values to a list called scores and you
    will do this with a while loop. That is, prompt user to enter value for scores
    (integers) and keep on doing this until user enters the value of -99.
    Each time you enter a value you will add the score entered to list scores. The
    terminating value of -99 is not added to the list
    Hence the list scores should be initialized as an empty list first using the
    statement:
    scores = []
    Once you finish enter the values for the list, define and called a find called
    print_scores() that will accept the list and then print each value in the list in
    one line separate by space.
    You should use a for-loop to print the values of the list.</p>
  </blockquote>