Advertisement
ShaunakVids

The Things to Love

Sep 18th, 2024 (edited)
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. # The Things to love.
  2. # A python Project
  3.  
  4. # Tuples
  5.  
  6. t = ("RCB", "Pizza", "Ronaldo", "Leela Palace")  # Assigning Tupple Values
  7. print(t)  # Prining the tuple
  8.  
  9. # Dictionaries
  10. d = {
  11.     "VK18": "We need those incredible bowlers",
  12.     "VKIND": "We have the best lineup of bowlers",
  13. }  # Assining Values to Keys
  14. print(d["VK18"])
  15.  
  16. # Lists
  17.  
  18. my_favs = [
  19.     "Ronaldo wins the WORLD CUP, RCB wins the IPL CUP",
  20.     "Virat Kohli hits a DOUBLE CENTURY!!",
  21. ]  # Assingning values for a list.
  22. my_favs.append(18)  # Adding Elements to the list
  23. print(my_favs)  # Printing the list
  24. print(len(my_favs))  # Printing the length of the list
  25. print(my_favs[-1])
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement