Here’s a silly exercise for today. Create a list of 1000 random numbers between -100 and 100.
Use this list to create a deque with the same 500,000 numbers.
Part 1
Now, write a function that empties the list from the right. So, create a loop that takes out the last item from the list until the list is empty.
Write another function or modify the first one to empty the list from the left. So, you’ll remove the first item from the list repeatedly until the list is empty.