Posts by rguest • 11 points
2 posts
-
-2
votes2
answers433
viewsQ: recursive function with lists
I need to write a recursive function that takes 2 lists and returns a new list by subtracting the elements from the first ones, for example: >>> subtrai([2, 3, 4, 5], [2, 3]) [4, 5] I know…
-
0
votes1
answer55
viewsQ: How to test if all elements are 2-element tuples
I am solving an exercise that I first have to test whether the argument received is a Double. If yes, I have to test if all its elements are tuples of 2 elements, where the first is a string, and…