#!C:\Python33\python.exe import cgi form = cgi.FieldStorage() # getlist() returns a list containing the # values of the fields with the given name colors = form.getlist('color') print ("Content-Type: text/html\n") print ('
') print ('The colors list:', colors) for color in colors: print ('', cgi.escape(color), '
') print ('')