Question: Write a function that takes in a list of 3 numbers and returns a list of all possible permutations of that list. (python)You can do
Write a function that takes in a list of 3 numbers and returns a list of all possible permutations of that list.
(python)You can do this by brute force and but also try using recursion. If you figure out a recursive solution, try to make it work for a list of n numbers.
def perm_list(myList): # YOUR CODE HERE raise NotImplementedError() #perm_list([1,2,3])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
