Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Python 3.6 I need help with the following, I need to Write a function function named dedupe that accepts two lists as parameters, for
Using Python 3.6 I need help with the following, I need to Write a function function named "dedupe" that accepts two lists as parameters, for example dedupe(list_one, list_two). The function will return a new list that contains only unique values that occurred in either one of the lists.
The function must pass a test written with this code
def test_question_one(): try: l_one = [1, 2, 3, 4, 1] l_two = [2, 5, 6, 7] deduped = dedupe(l_one, l_two) if (deduped.count(2) > 1) or len(deduped) < 7: raise else: print('Question One Passed! Great Job!') except: print('Ooops, please try question one again.')
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started