Question
Python 3 Implement the function unique() that takes as a parameter a two-dimensional list and returns a one- dimensional list containing all the unique entries
Python 3
Implement the function unique() that takes as a parameter a two-dimensional list and returns a one- dimensional list containing all the unique entries in the list. The entries in the list returned do not need to be ordered in any particular way. For example, in the list [[1, 0, 1], [0, 1, 0]] there are only two unique values (0 and 1) so the function would return the list [0, 1] (or the list [1, 0] -- both are valid). The list passed as a parameter should not be altered by the function. The following shows the function as used on several different parameters:
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