sider
list.
Here's a little pseudo code if that helps.
if list[[x][0]] == 'value': # where x can be anything > 0
print 'found'
So, is there a similar method like list.count('value') that I use for 1D lists?
Regards,
--
Olli Rajala <><
Tampere,
, it's 'Debian loaded with
current software'. ;) I mean, it's based on Debian, but the dev cycle
is much faster than with Debian.
Yours,
--
Olli Rajala <><
Tampere, Finland
http://www.students.tut.fi/~rajala37/
"In the
ormation from very different sources and try to make
it work... For example, this is from a manual I've used:
2.1.3.1 PQconnectdb
Syntax:
c = PQconnectdb(conninfo)
Where conninfo is a string containing connection information.
What the heck is 'conninfo', I mean, what's
grams with MySQL+Python/Php/Java. So, if you have some good
tutorials or something else info, I'd be glad to know!
Oh, I can install additional modules, but it would be great if Ubuntu
had them...
Thanks!
--
Olli Rajala <><
Tampere, Finland
http://www.students.tut.fi/~rajala37/
ht way to do it.
I tried some Googling, but because don't know the proper terms, it
wasn't very successful. So, any ideas would be very welcome!
Yours,
--
Olli Rajala <><
Tampere, Finland
http://www.students.tut.fi/~rajala37/
&qu
ecause
the list contains x.jpg and x_thumb.jpg which have been collected by
os.listdir(). At least I suppose that it would be like [x.jpg,
x_thumb.jpg, y.jpg, y_thumb.jpg] or am I completely wrong? But thanks
for good suggestions, I replaced my code with the list comprehension
method and it works now. Thank
thanks anyway.
Yours,
--
Olli Rajala <><
Tampere, Finland
http://www.students.tut.fi/~rajala37/
"In theory, Theory and Practice should be
the same. But in practice, they aren't."
- Murphy's Proverbs
___
Tutor maillist
n fileNames:
if line[-10:] == '_thumb.jpg':
fileNames.remove(line)
But I really doubt that it's not the best way to do this. So, any
comments are really appreciated.
Back to coding...
--
Olli Rajala <><
Tampere, Finland
http://www.students.tut.fi/~rajala37/
&qu
the program is
running on, if that matters. Oh, the program is a cgi-script running
on Apache2 and it's running on my own computer so if I need to install
some additional modules, it is possible.
Thanks in advance!
--
Olli Rajala <><
Tampere, Finland
http://www.students.tut.fi/~raja
sking, though.
Yours,
--
Olli Rajala <><
Tampere, Finland
http://www.students.tut.fi/~rajala37/
"In theory, Theory and Practice should be
the same. But in practice, they aren't."
- Murphy's Proverbs
___
Tutor maillist - Tutor
info, hope that this other problem could be solved as well.
Yours sincerely,
--
Olli Rajala <><
Tampere, Finland
http://www.students.tut.fi/~rajala37/
"In theory, Theory and Practice should be
the same. But in practice, they aren't."
- Murphy's Proverbs
_
else works well when
speaking about this encoding thing. I really hope that someone would
know a solution. I don't mind if I have to write only ASCII but I'm
not the only user for that tool, so...
Yours sincerely,
--
Olli Rajala <><
Tampere, Finland
http://www.students.tut
ou anything to check that... :)
Yours,
--
Olli Rajala
"In theory, Theory and Practice should be
the same. But in practice, they aren't."
- Murphy's Proverbs
___
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor
g from
Eric. S. Raymond if you want to know more.
So, it may take much time to implement your read/write-functions but
it's almost always at least as good as binary approach.
Of course, as usual, YMMV and IMHO. :)
--
Olli Rajala
"In theory, Theory and Practice should be
the same. B
14 matches
Mail list logo