''' Support your understanding of lists list building ''' # get some lists print() # create and add to values values = [ ] # initiating our empty list --> accumulator --> accumulate elements to this list # append( x ) is a list function # it takes one argument that is the thing you want to put to the end of a list values.append( "u" ) # values = ['u'] values.append( "v" ) # values = ['u', 'v'] values.append( "a" ) # values = ['u', 'v', 'a'] values.append( "!" ) # values = ['u', 'v', 'a', '!'] values.append( " " ) # so on... values.append( "u" ) values.append( "v" ) values.append( "a" ) values.append( "!" ) print( "values =", values ) input('Enter when ready: ') # hits Enter key when you reach this point # create and add to ints ints = [] # for each int within the range [0, 10) - includes from 0 and up to but not including 10 == [0, 9] # we append the int into the list ints for i in range( 0, 10 ) : ints.append( i ) print( "ints =", ints ) # indent the print statement here! this will print the list ints for each # run of the for loop # print( 'ints =', ints ) # we print the final version of the list ints once after the for loop is done # this is the same as the first few lines # you can see how a for loop is helpful --> shortens your code a lot s = 'uva! uva!' letters = [] for ch in s: letters.append( ch ) print( letters )