P: n/a

Excuse me, i was trying in too many ways but i couldnt access subindex
on a list , the problem is the next:
I have
indif=[[0,'A'],[1,'B'],[2,'C'],[3,'D']]
and
indic=[[0,'B'],[1,'C'],[2,'D'],[3,'E']]
i need to eval if indic[i][j] is equal to indif[i][j]
I used a double for but i had got "list index out of range". How can i
do ???
Thanks a lot,
Cordially,
jDSL  
Share this Question
P: n/a

jairodsl wrote:
Excuse me, i was trying in too many ways but i couldnt access subindex
on a list , the problem is the next:
I have
indif=[[0,'A'],[1,'B'],[2,'C'],[3,'D']]
and
indic=[[0,'B'],[1,'C'],[2,'D'],[3,'E']]
i need to eval if indic[i][j] is equal to indif[i][j]
I used a double for but i had got "list index out of range". How can i
do ???
Thanks a lot,
Cordially,
jDSL
pyi = 1
pyj = 0
pyindif[i][j] == indic[i][j]
True
Works for me.
James  
P: n/a

"James Stroud" <js*****@mbi.ucla.eduwrote in message
news:eo**********@zinnia.noc.ucla.edu...
 jairodsl wrote:
 Excuse me, i was trying in too many ways but i couldnt access subindex
 on a list , the problem is the next:
 >
 I have
 >
 indif=[[0,'A'],[1,'B'],[2,'C'],[3,'D']]
 >
 and
 >
 indic=[[0,'B'],[1,'C'],[2,'D'],[3,'E']]
 >
 i need to eval if indic[i][j] is equal to indif[i][j]
 >
 I used a double for but i had got "list index out of range". How can i
 do ???
 >
 Thanks a lot,
 >
 Cordially,
 >
 jDSL
 >

 pyi = 1
 pyj = 0
 pyindif[i][j] == indic[i][j]
 True
Or, if you mean for every i and j, just
indif == indic
and let the types equality method do the work for you.  
P: n/a

At Tuesday 16/1/2007 20:08, jairodsl wrote:
>Excuse me, i was trying in too many ways but i couldnt access subindex on a list , the problem is the next:
I have
indif=[[0,'A'],[1,'B'],[2,'C'],[3,'D']]
and
indic=[[0,'B'],[1,'C'],[2,'D'],[3,'E']]
i need to eval if indic[i][j] is equal to indif[i][j]
I used a double for but i had got "list index out of range". How can i do ???
Posting your actual code would help. indif[i][j] should be fine, if i
is between 0 and 3 inclusive, and j is 0 or 1.

Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! http://www.yahoo.com.ar/respuestas  
P: n/a

its working for me i think its better to mention the value of i and j
for both lists or you might have done mistake while formatting strings
it should be %s for strings and %d for numbers if any subelement in
lists does not formatted properly it may lead to error   This discussion thread is closed Replies have been disabled for this discussion.   Question stats  viewed: 1173
 replies: 4
 date asked: Jan 16 '07
