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 4 1397
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
"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.
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
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 thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Angelo Secchi |
last post by:
I'm trying to use eval (is the right function? ) to generate empty lists
with different names(es. list_1, list_2, list_3, ...) in a loop similar
to:
for index in range(1,4):
list=
for index in...
|
by: Joe Fallon |
last post by:
I have some complex logic which is fairly simply to build up into a string.
I needed a way to Eval this string and return a Boolean result.
This code works fine to achieve that goal.
My...
|
by: manstey |
last post by:
Hi,
I have a text file called a.txt:
# comments
I read it using this:
|
by: rdrink |
last post by:
n.n.h. (noob needs help)
Ok, I've been beating my head against this for a day... time to ask
others.
To explain things as simply as possible:
I am trying to use eval() to evaluate some simple...
|
by: abhishek |
last post by:
>>a,b=3,4
7
Now I want to evaluate y by substituting for the evaluated value of x.
eval(y) will try to add "a+b" to 3 and return an error. I could do
this,
10
but this becomes unwieldy if I...
|
by: FAQ server |
last post by:
-----------------------------------------------------------------------
FAQ Topic - When should I use eval?
-----------------------------------------------------------------------
The ` eval() `...
|
by: =?ISO-8859-1?Q?Tor_Erik_S=F8nvisen?= |
last post by:
Hi,
A while ago I asked a question on the list about a simple eval
function, capable of eval'ing simple python constructs (tuples, dicts,
lists, strings, numbers etc) in a secure manner:...
|
by: J. Clifford Dyer |
last post by:
On Tue, 2007-12-11 at 16:55 -0800, katie smith wrote:
Katie,
First, please provide a useful subject heading when posting to the list.
It makes everyone's life easier when searching the...
|
by: RandomElle |
last post by:
Hi there
I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |