0

Want to clear how to write a program to store the given telephone details in dictionary and print all the number whose name starts with e.
Data =('Einstein':1234567896),('newton':2478965782),('Alexander':9876543216)

4
Contributors
3
Replies
24
Views
9 Months
Discussion Span
Last Post by sahilmohile15
0
Data ={'Einstein':1234567896,'newton':2478965782,'Alexander':987654321}
for names in Data.keys():
    if (names.lower()).startswith('e'):
        print(names)
0

Try making Data as an array then turn every string into Uppercase for storing so you wont have Any problems with upper and lower case then use If..Else to check if exist and then print.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.