Respuesta :
Answer:
# The user in prompted for input and stored in userInput
userInput = str(input("Enter the contact: "))
# The user input is splitted and stored in splitUserInput
# splitUserInput is a list because split returns a list
splitUserInput = userInput.split(" ")
# The user is prompt to enter the search contact
# The search contact will have the first letter capitalize
# should it be entered in lower case all through
searchContact = str(input("Enter the search contact: "))
# loop through the list
for i in range(len(splitUserInput)):
# compare if the string at any value of i
# is the same as the searchContact
# we display the string ahead of it
# by adding 1 to the index
if(splitUserInput[i] == searchContact):
print(splitUserInput[i + 1])
Explanation:
A sample screenshot is attached. The code is written in Python 3 and well commented.
The program prompt the user for input then split the input into a list. It then asked for a contact to search for. It begins looping through the list, if the search contact is found at any index, then it prints what is in front of the index.

The program returns associated phone number with a particular contact, the program is written in python 3 ;
details = str(input("Enter contact: "))
#input user details
details_split = details.split(" ")
#split the details into seperate indexes
contact = str(input("Search name: "))
for ind in range(len(details_split)):
if(details_split[ind] == contact):
#Check if the name search is the same as the detail
print(details_split[i + 1])
#display the next variable In the list which is the phone number
Learn more : https://brainly.com/question/15569615