I would like the program to ask the user if they want to add a color. If they say yes, then ask what color to add. Then after that happens, once the program would ask if you want to, run it again. If they say no to add a color, the program ask if you want to remove a color from the list. If they say yes, it would then ask what color to remove, with error handling built in if the color wasn't in that list. Then after that happens once the program would ask if you want to run it again.
Just wanted to point out I do not know a lot about Python, so please don't be harsh, but I can take constructive criticism.
import socket # imports the socket module import sys # imports the sys module import console # imports the console module usr = raw_input('What is your name? \n').title() # asks for users name for the hostname information sname = socket.gethostname() # sets sname to gethostname print '\nThis program is being run by', usr, 'on machine name', sname # displays host information mylist = ['Red', 'White', 'Blue', 'Yellow', 'Green', 'Orange'] # sets mylist to colors templist = list(mylist) # sets templist as mylist runagain = 'y' # sets runagain to a y values while runagain == 'y': # for looping print '\nThe current colors are:', templist # print out list so user knows what colors are already there clradd = raw_input('\nWould you like to add any colors to the list? y or n\n') while clradd == 'y': colors = raw_input('\nWhat colors would you like to add to the list? Please type one color. \n').title() templist.append(colors) # appends color to the list print templist # prints out new list print '\nAscending and Descending' # print out ascending and descending lists print '-' * 30 print '\nAscending (high to low): ', sorted(templist, reverse=True) print '\nDescending (low to high): ', sorted(templist, reverse=False) clrdel = raw_input('\nWould you like to remove any colors from the list? y or n\n') while clradd == 'n': clrdel = raw_input('\nWould you like to remove any colors from the list? y or n\n') while clrdel == 'y': try: removecolor = raw_input('\nWhat colors would you like to remove? ').title() # asks user color to remove templist.remove(removecolor) # removes color from the list except ValueError: print 'Looks like that color was not in the list, try again.' continue print 'Updated list\n', templist # prints out updated list runagain = raw_input('\nWould you like to run this program again again? y or n') if runagain == 'n': # if runagain is n console.hide_output() # hide the output while clrdel == 'n': runagain = raw_input('\nWould you like to run this program again again? y or n') # asks user to run again if runagain == 'n': # if runagain is n console.hide_output() # hide the output sys.exit() # stops the program