Question: Write a program that reads a list directly from the user, then removes duplicate top-level elements in it and prints out the resulting list. You

Write a program that reads a list directly from the user, then removes duplicate top-level elements in it and prints out the resulting list. You may not use the Python set type to do this problem.

Hint: Use eval(input("input list: ")) to read a list from the user. eval(s) is a built-in Python function which evaluates its strargument s, converting it to the proper Python type and returning this value. (It's the Python interpreter as a built-in function.)

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!