I want to create a list which should be stored under mylist.
#Here is my code.
mylist = [10,20,30,'apple',True,8.10]
mylist
output: [10, 20, 30, 'apple', True, 8.1]
#I want to add two numbers to the list using append()
mylist.append(30)
mylist.append(40)
But the out put has shown as below by getting added the elements two times.
mylist
output: [10, 20, 30, 'apple', True, 8.1,30,40,30,40]
Then I wanted to remove the extra numbers from the list 30,40
mylist.remove(40)
mylist.remove(30)
However I was able to remove both the elements contain 40 and one 30
mylist
output: [10, 20, 'apple', True, 8.1, 30]
#Now I want to move the last element to the 3rd position which should look like the below output.
mylist
desired output: [10,20,30,'apple',True, 8.1]
And finally I want to add my two extra elements 30,40 to 'mylist' using append() with out any repetitions.