You are on page 1of 2

Lab13_Part_1

Answer 1
dictlist = []
the_dict = {}

while True:

name = input("Name :")


Email = input("Email :")
Phone_number = input("Phone number :")
dictlist.append((name, Email, Phone_number))
the_dict[name] = Email, Phone_number

choice = input("\nDo you want to add more (y/n) ? ")

if choice == 'n':

break

print(the_dict.keys())
print(the_dict.values())
print(the_dict)
Answer 2
() This parenthesis will be used to create tuples. We can put all the elements in that
parenthesis.
It can be separated by commas. They are optional, however, it is a good practice to use them.
A tuple can have any number of elements and they may be of different types of integer, float,
list, string, etc.

Declaring Tuples
new_tuple = ()
new_tuple = (1, “Hello”, 2.5)

You might also like