← Back to challenges

Two Lists inside a List to One

PythonHardarrayslogic

Instructions

Programmer Pete is trying to combine two lists inside one list into one without changing the order of the list nor the type and because he's pretty advanced he made it without blinking, but I want you to make it, too.

Examples

one_list([[1, 2], [3, 4]]) ➞ [1, 2, 3, 4]

one_list([["a", "b"], ["c", "d"]]) ➞ ["a", "b", "c", "d"]

one_list([[True, False], [False, False]]) ➞ [True, False, False, False]

Notes

  • Remember to return the list.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Burglary Series (10): Calculate Difference