Removing Duplicates
Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
Write a program that removes duplicated elements from a list. A duplicated element is any element which appears exactly twice.
The first line of your program should set up a variable l
to hold the input list. For example:
l = ["hi", 1, 2, 3, 3, "hi", "hi", 1, 6]
Your program should print the resulting list. For example, it would print the following for the example l
:
["hi", 2, "hi", "hi", 6]
When you are ready (once you have simulated by hand and tested on your own machine and are convinced that your program will do the right thing), upload your file below for testing:
No file selected
Next Exercise: Delivery Pricing