Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
2k views

Cons List in Python

It make sense to not allow links to external code hosting, so I restated my question. This is classical cons list in python using Abstract Base Class interface. Constructor is in fact out of the Cons ...
Robert Hanigan's user avatar
7 votes
2 answers
854 views

Recursive higher-order function

I have implemented a through function for myself in a project. Since I am still quite new in python and want to learn it correctly, I would be happy about any ...
mcocdawc's user avatar
  • 974
1 vote
2 answers
177 views

A double search function that looks in a list for one value and then the other alternatively

I'm writing in Python (3.4) a double search function that looks in a list for one value and then the other alternatively. That is, start searching the second value once you find first the first value (...
pa7x1's user avatar
  • 13
3 votes
3 answers
3k views

Primality test using recursion

For the given below exercise: Here is one method to check if a number is prime: ...
overexchange's user avatar
  • 3,401