Advertisement
singam_dev57

Favorite Movies Organizer

Dec 27th, 2024
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | Source Code | 0 0
  1. favorite_movies = ["Inception", "The Matrix", "Interstellar", "The Dark Knight"]
  2.  
  3. favorite_movies.append("Godfather")
  4. print(f"\n Adding a new movie to my favourite movie list {favorite_movies}")
  5.  
  6. favorite_movies.remove("The Matrix")
  7. print(f"\n Removing a movie from my favourite movie list {favorite_movies}")
  8.  
  9. print(f"\n Prints out the total number of movies in the list {len(favorite_movies)}")
  10.  
  11. print(f"\n Prints out the movies in alphabetical order{sorted(favorite_movies)}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement