quick question

2005-03-07 Thread Leeds, Mark
I have a string variable say “8023 “ and I want to get rid of the beginning And ending quotes.   I’ve tried different things But haven’t had any success.   I’m definitely a python hacker and Not an expert. Thanks.        Mark -- http://mail.

FW: list reduction

2005-03-10 Thread Leeds, Mark
  I have a structure in python that I think is a list with elements .Cap and .Ticker where Cap is a float and Ticker is string.   So, I reference things like industrylist[i].cap and industrylist[i].ticker and this works fine.   What I want to do is reduce the list so that it only

novice question

2005-03-11 Thread Leeds, Mark
I have a dictionary grp that has lists for each element ( excuse my terminology if it’s incorrect).   So gname might be automobiles, finance, construction etc and grp[gname] is a list and this list has elements that are strings such as [“AAA”,”BBB”,”AAA”,”CCC”]   Is there a quick w

using the set command

2005-03-11 Thread Leeds, Mark
Do I have to import something In order to use the set command ? I am trying to use it but I keep getting an error.   Mark -- http://mail.python.org/mailman/listinfo/python-list

newbie : modifying a string in python

2005-03-16 Thread Leeds, Mark
I want to modify a string in the following way :   for s in stks:   s = s.strip()   if ( s[-2:] == ‘GR’ ):   s[-2:]= ‘GF’   so, if the last two characters are GR, I want to change them to GF ( there will be other if statements also but I am just putting this one

newbie:unique problem

2005-03-17 Thread Leeds, Mark
I have a function uniqueList that is below :   Def uniqueList(origList):       nodups= {}     for temp in origList:    nodups[temp]  = None     returns nodups.keys()   When used in the following context :   industryList = uniqueList(jpbarradata[group])   where jpbarradata[g

FW: Python help group

2005-03-22 Thread Leeds, Mark
Can someone help me with below  ? It’s not my question but I will forward any answers to my friend who I am sending this for.   Mark       -Original Message- From: Tan, Heap Ho Sent: Tuesday, March 22, 2005 1:11 PM To: Leeds, Mark

FW: FW: Python help group

2005-03-22 Thread Leeds, Mark
This is a follow up question To the previous question About sorting that I sent for my friend. -Original Message- From: Tan, Heap Ho Sent: Tuesday, March 22, 2005 2:06 PM To: Leeds, Mark Subject: RE: FW: Python help group How can you speed it? Does anyone know if

RE: nested tuple slice

2005-04-12 Thread Leeds, Mark
maybe list(tuple)[0:2])) will get you what you want  but I don’t know how to change it back to a tuple. I’m just starting out but I would be interested also.       mark   -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of d