''' Support your understanding of lists list building ''' # get some lists print() # create and add to values values = [ ] values.append( "u" ) values.append( "v" ) values.append( "a" ) values.append( "!" ) values.append( " " ) values.append( "u" ) values.append( "v" ) values.append( "a" ) values.append( "!" ) print( "values =", values ) # list.append(x) will add x as a new element to the end of your list # l1 = ['hi'] # l1.append('new') # l1 now looks like ['hi','new'] input() # create and add to ints # Using loops to build up lists! # ACCUMULATION ints = [] # empty list as our accumulator (we're building up a list!) other_ints = [] for i in range( 0, 10 ) : # loop through values 0 to 9 # Adding an element at the end of a list (.append) print('i =', i, 'and ints =', ints) # before we add the current value of i ints.append( i ) # add each number as a new element one by one to # our list # Adding an Element at the front of a list print('i =', i, 'and other_ints =', other_ints) other_ints.insert(0, i) # insert the new element at index 0 (the first # element) print('other_ints=', other_ints) print( "ints =", ints ) #.append() is only for lists.