In this problem you must implement several functions on lists in Python.
Write a function @myLength(L)@ that, given a list, returns its length.
Write a function @myMaximum(L)@ that, given a non-empty list, returns its maximum.
Write a function @average(L)@ that, given a non-empty list of numbers, returns its average.
Write a function @buildPalindrome(L)@ that, given a list, returns the palindrome that starts with the reverse of the list.
Write a function @remove(L1, L2)@ that, given a list and a list , returns the list after removing the occurrences of the elements in .
Write a function @flatten(L)@ that recursively flattens a list whose elements may also be lists of different levels. Hint: use recursion and the @isinstance(x, list)@ built-in function.
Write a function @oddsNevens(L)@ that, given a list of integers, returns two lists, one with all the odd numbers and one with all the even numbers, in the same relative order than the original.
Write a function @primeDivisors(n)@ that returns the list of all prime divisors of a non-zero positive integer.
Each function scores 12 points and the sample 4.
Author: Unknown
Translator: Jordi Petit
Generation: 2026-01-25T11:08:12.367Z
© Jutge.org, 2006–2026.
https://jutge.org