Solving the Einstein's Riddle in Python

Carl Banks imbosol at aerojockey.com
Mon May 24 20:40:48 EDT 2004


Juha Haataja <juha.haataja at csc.no-spam.fi> wrote in message news:<juha.haataja-46ED17.14123824052004 at newsread.funet.fi>...
> I have been learning Python since April, and would like a
> few comments from the experts on list processing.
> 
> I managed to implement a Python code for solving the
> so-called  Einstein's Riddle, see e.g.:
> 
>   http://www.manbottle.com/trivia/Einstein_s_Riddle.htm
> 
> I solved the problem in two ways, first the straightforward
> way by using lists and list comprehensions. Then I
> refactored to code using the Python object model by
> deriving new datatypes from the Python list object. The
> two versions are available here:
> 
>   http://www.csc.fi/oppaat/f95/python/talot.py 
>   http://www.csc.fi/oppaat/f95/python/talot_oo.py

Wow, you wrote all that code?  Here's my solution:

    print "I don't know"


-- 
CARL BANKS



More information about the Python-list mailing list