I need some help with my homework for school. I am supposed to write a program in python that ask the person for a list of numbers, in my case:
[53,16,22,81,43,16,88,55,43,5]
and print out the numbers that appear twice in it in the same order they appeared. I am also supposed so use the eval
function in my program.
All I have currently is this:
list= eval(input("Input your list: "))
The end result is supposed to look like this in python shell: Input a list: [53,16,22,81,43,16,88,55,43,5]
[16, 43]
Please help!