Question: PYTHON need help with this question thanks in advance 4. 12 points Write a program to first repeatedly ask the user for a short string

 PYTHON need help with this question thanks in advance 4. 12

PYTHON need help with this question thanks in advance

4. 12 points Write a program to first repeatedly ask the user for a short string which is appended to a list, then after the user enters , again repeatedly ask the user for a string, which this time is added to a tuple. Once the user enters , the program should display: a) the list and the tuple of user's strings b) All the strings that appear in both collections - the list and the tupple c) Number of the strings that appear in both collections Hint: a tuple containing a single element a, is coded as (a,) not as (a) A typical run might look like: adding to a list please enter a short string or to terminate aaa please enter a short string or to terminate abc please enter a short string or to terminate bbb please enter a short string or to terminate bcd please enter a short string or to terminate ccc please enter a short string or to terminate cde please enter a short string or to terminate now adding to a tuple please enter a short string or to terminate abc please enter a short string or to terminate cde please enter a short string or to terminate fgh please enter a short string or to terminate your list: ['aaa', 'ab', 'bbb', 'bcd', 'ccc', 'cde'] your tuple: ('abc', 'cde', 'fgh') string abc is in both list and tuple string cde is in both list and tuple 2 strings are in both

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!