Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions