#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 19 10:11:08 2019

@author: davinpc
"""

# 3-4 GuestList
guest_list = ["Steve Jobs","Robert Downey Jr","Will Smith"]
for guest in guest_list:
    print("Dear " + guest + ", please come to my dinner.")

print(" ")

# 3-5 ChangingGuestList
print(guest_list[0] + " can't come to the dinner.")
guest_list[0] = "Emilia Clarke"
for guest in guest_list:
    print("Dear " + guest + ", please come to my dinner.")

print(" ")

# 3-6 MoreGuests
print("Dear Guests, we have found a bigger dinner table.") 
guest_list.insert(0, "Dwayne Johnson")
guest_list.insert(2, "Gordon Ramsay")
guest_list.append("Walt Disney")
for guest in guest_list:
    print("Dear " + guest + ", please come to my dinner.")

print(" ")

# 3-7 ShrinkingGuestList
print("Dear Guests, we can only invite two people to dinner.")
popped_guest1 = guest_list.pop()
print("Dear " + popped_guest1 + ", we're sorry we can't invite you to dinner.")
popped_guest2 = guest_list.pop()
print("Dear " + popped_guest2 + ", we're sorry we can't invite you to dinner.")
popped_guest3 = guest_list.pop()
print("Dear " + popped_guest3 + ", we're sorry we can't invite you to dinner.")
popped_guest4 = guest_list.pop()
print("Dear " + popped_guest4 + ", we're sorry we can't invite you to dinner.")
for guest in guest_list:
    print("Dear " + guest + ", you are still invited to the dinner.")
del guest_list[1]
del guest_list[0]
print(guest_list)


print(" ")

# 3-8 SeeingTheWorld
places = ["USA","Greece","Dubai","Switzerland","Germany"]
print(places)
print(sorted(places))
print(places)
print (sorted(places,reverse=True))
print(places)
places.reverse()
print(places)
places.reverse()
print(places)
places.sort()
print(places)
places.sort(reverse=True)
print(places)








