How about:
list(frozenset(['0024', 'haha', '0024']))
[EMAIL PROTECTED] schrieb:
On Apr 4, 2:20 am, bahoo [EMAIL PROTECTED] wrote:
Hi,
I have a list like ['0024', 'haha', '0024']
and as output I want ['haha']
If I
myList.remove('0024')
then only the first instance of '0024' is removed.
Is this supposed to be a joke?
First of April? Likely.
--
http://mail.python.org/mailman/listinfo/python-list
Hello list!
I need to repopulate PyGTK ComboBox on a regular basis. In order to do
so I have to remove all the entries and then add the new ones. I tried
to remove all entries like that:
def clear_comboboxes(boxreference):
try:
while True:
boxreference.remove_text(0)
Hej!
model = combo_box.get_model()
combo_box.set_model(None)
model.clear()
for entry in desired_entries:
model.append([entry])
combo_box.set_model(model)
model.append is essentially the same as combo_box.append_text. Setting
the model to None before making changes to it
SAMS Teach yourself C in 21 days by Bradley L. Jones and Peter Aitken
Learning C++ is not worth is in my opinion, since you can get the OOP
power from Python and use C if you need speed...
Thomas Nelson schrieb:
I realize I'm approaching this backwards from the direction most
people go, but
volcano schrieb:
Can it be done, and if yes - how?
Define address. Are you talking about URLs? File paths? Postal
addresses? Memory addresses? Whatever addresses?
I'm afraid the people on this list can't read your thoughts...
--
http://mail.python.org/mailman/listinfo/python-list
In order to find all the words in a text, you need to tokenize it first.
The rest is a matter of calling the count method on the list of
tokenized words. For tokenization look here:
http://nltk.sourceforge.net/lite/doc/en/words.html
A little bit of warning: depending on what exactly you need to
Srikanth schrieb:
Yes,
All I need is a good IDE, I can't find something like Eclipse (JDT).
Eclipse has a Python IDE plug-in but it's not that great. Please
recommend.
Thanks,
Srikanth
http://www.serpia.org/spe
http://www.die-offenbachs.de/detlev/eric.html
--
Use pexpect: http://pexpect.sourceforge.net/
flupke schrieb:
Hi,
i made a backup script to backup my postgres database.
Problem is that it prompts for a password. It thought i
could solve this by using popen2.
I tested popen2 with dir (i'm on windows 2000, python 2.4.3)
and it works.
Hello Python-List
I hope somebody can help me with this. I spent some time googling for an
answer, but due to the nature of the problem lots of unrelevant stuff
shows up.
Anyway, I reimplemented parts of TigerSearch (
http://www.ims.uni-stuttgart.de/projekte/TIGER/TIGERSearch/ ) in Python.
I am
As far as I know Windows does not support ncurses natively (using CygWin
probably changes that). So go with Tkinter. Looks crappy but at least it
should run on all major platforms...
Hi All,
Just learning Python - my first new language for about 18 years (I'm
not a programmer ...). I'm writing
11 matches
Mail list logo