print("Welcome to the Favorite Teachers Program")
print()
ls = []
a = input("Who is your first favorite teacher: ").title()
b = input("Who is your first favorite teacher: ").title()
c = input("Who is your first favorite teacher: ").title()
d = input("Who is your first favorite teacher: ").title()
ls.append(a)
ls.append(b)
ls.append(c)
ls.append(d)
print("Your favourite teacher ranked are: {}".format(ls))
print("Your favourite teacher alphabetically are: {}".format(sorted(ls)))
print("Your favourite teacher in reverse alphabetical reverse order  are: {}".format(sorted(ls, reverse=True)))
print()
print("Your top two teachers are: {} and {}.".format(ls[0],ls[1]))
print("Your next two teachers are: {} and {}.".format(ls[2],ls[3]))
print("Your last favourite teacher is: {}".format(ls[-1]))
print("You have a total of {} favorite teachers".format(len(ls)))
print("Oops, {} is no longer your first favorite teacher ".format(a),end = '')
e = input("Who is your new FAVORITE teacher: ").title()
ls.insert(0, e)
print("Your favourite teacher ranked are: {}".format(ls))
print("Your favourite teacher alphabetically are: {}".format(sorted(ls)))
print("Your favourite teacher in reverse alphabetical reverse order  are: {}".format(sorted(ls,reverse=True)))
print()
print("Your top two teachers are: {} and {}.".format(ls[0],ls[1]))
print("Your next two teachers are: {} and {}.".format(ls[2],ls[3]))
print("Your last favourite teacher is: {}".format(ls[-1]))
print("You have a total of {} favorite teachers".format(len(ls)))
print("You've decided you no longer like a teacher. ", end= '')
r = input("Which teacher would you like to remove from you list: ").title()
ls.remove(r)
print("Your favourite teacher ranked are: {}".format(ls))
print("Your favourite teacher alphabetically are: {}".format(sorted(ls)))
print("Your favourite teacher in reverse alphabetical reverse order  are: {}".format(sorted(ls,reverse=True)))
print()
print("Your top two teachers are: {} and {}.".format(ls[0],ls[1]))
print("Your next two teachers are: {} and {}.".format(ls[2],ls[3]))
print("Your last favourite teacher is: {}".format(ls[-1]))
print("You have a total of {} favorite teachers".format(len(ls)))




