Write a python program to find any one contact from your mobile contacts.
(Note: take all the contacts in string and take any one contact to search)
1
Expert's answer
2011-08-02T14:17:20-0400
contacts = """ michael 34234234234 rahmanan 23453654564 budukozel 67854654623 """
contact_to_find = "rahmanan"
for contact in contacts.split("\n"): if contact: & data = contact.split(" ") & name, phone = data[0], data[1] & if name == contact_to_find: & print(name, phone) & break
Comments
Leave a comment