Question: ## Question 6 : first _ duplicate function ( 8 marks ) , Write a function called first _ duplicate that takes a
## Question : firstduplicate function marks
"Write a function called firstduplicate that takes a list as an argument and returns the first element that is duplicated in the list. If no duplicates are found, the function should return None. Hint: One way of doing this is to use the count method to see how many instances of each element there are. If there is more than it means that that element is duplicated.
"Write code to test the function firstduplicate with a list of numbers and a list of tuples. If your function does not work with both types, then change it until it does work with these two types."
"celltype": "code",
"executioncount": null,
id: ef
"metadata":
"outputs":
"source":
"celltype": "markdown",
id: cab
"metadata":
"source":
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
