64 617
Assignments Done
99,1%
Successfully Done
In September 2018

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
&quot;&quot;&quot;

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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions