76 338
Assignments Done
Successfully Done
In May 2019

Answer to Question #3385 in Python for mukunda

Question #3385
Write a python program to find any one contact from your mobile contacts.
<br>(Note: take all the contacts in string and take any one contact to search)
Expert's answer
contacts = &quot;&quot;&quot;
michael 34234234234
rahmanan 23453654564
budukozel 67854654623

contact_to_find = &quot;rahmanan&quot;

for contact in contacts.split(&quot;\n&quot;):
if contact:
& data = contact.split(&quot; &quot;)
& name, phone = data[0], data[1]
& if name == contact_to_find:
& print(name, phone)
& break

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions