[Tutor] new to prog. question

riex@ligbr.com.br riex@ligbr.com.br
Tue Mar 25 23:13:02 2003


Hi tutor. 

I've a simple question.
I create a list containing numbers. list1=[1,2,4,8,16,32,64,128,512]
# which is 2**0 ...2**10
If I wanted to find if a given number, 12 for example, is
in the list would be easy. But, how about if x+y in the list equals
the number (12) ?
So, 8 + 4 for example. 

Maybe I am just going the wrong way here, and there is a easier way to do 
this.