Question: Given the following dictionary: { ' 4 5 6 9 8 ' : 'John Smith', ' 5 4 6 0 0 ' :'Mark Sebastian', '
Given the following dictionary:
: 'John Smith',:'Mark Sebastian',: 'Ruben Quin'
Where: key represents the customer id and value the customer's name.
Write a program that iterates through the dictionary, print the customer id and then search and print if the customer's name has the letter followed by two other characters. The output will look like this:
Searching customer id:
Substring is ith
Searching customer id:
Substring is ian
Searching customer id:
Not found
Finished in
Please explain and use ten lines of code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
