shrinking_list.py - \"3-7 Shrinking Guest List You just found out that your new dinner table wonre sorry you canre still invited Use del to remove the

shrinking_list.py - "3-7 Shrinking Guest List You just...

This preview shows page 1 out of 1 page.

"""3-7. Shrinking Guest List: You just found out that your new dinner table wonre sorry you canre still invited. Use del to remove the last two names from your list, so you have an empty list. Print your list to make sure you actually have an empty list at the end of your program. """ guest_list = ['jenna', 'valentina', 'minnie', 'maxine'] # not_coming = 'jenna' #guest_list.remove(not_coming) guest_list.append('julie') #message = f"Oh dear, {not_coming.title()} won't be able to come." #message1 = f"Hello {guest_name0}, I'd like to invite you dinner." guest_list.insert(0, 'lydia') guest_list.insert(4, 'girl4') print("Sorry everyone, I can only invite two people.") length = (len(guest_list) - 2) for name in length:
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Fall '19
  • susan lee

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture