On 31/10/2012 01:01, Brayden Zhao wrote:
def fieldict(filename):
D={}
with open(filename) as FileObject:
for lines in FileObject:
linelist=lines.split('\t')
Key=linelist[0]
ValCity=(linelist[12]).strip()
ValState=linelist[13]
ValOne=linelist[2]
On 11/06/2012 09:01 AM, Mark Lawrence wrote:
On 31/10/2012 01:01, Brayden Zhao wrote:
def fieldict(filename):
D={}
with open(filename) as FileObject:
for lines in FileObject:
linelist=lines.split('\t')
Key=linelist[0]
ValCity=(linelist[12]).strip()
On 11/03/2012 10:40 AM, Albert-Jan Roskam wrote:
On 11/03/2012 09:04 AM, Albert-Jan Roskam wrote:
Hello,
(I haven't run the code, as it was not presented in a form that I
could
do a single copy/paste. So I may have missed some subtlety in the
code.)
Hi, sorry about that.
On 06/11/2012 14:16, Dave Angel wrote:
On 11/06/2012 09:01 AM, Mark Lawrence wrote:
On 31/10/2012 01:01, Brayden Zhao wrote:
def fieldict(filename):
D={}
with open(filename) as FileObject:
for lines in FileObject:
linelist=lines.split('\t')
Key=linelist[0]
Steven D'Aprano wrote:
On 30/10/12 12:36, Frank Pontius wrote:
Hello,
I have code that works. Then tried to move some of it into function
IncrementAndRebuildInput, then result changes, I no longer have same result
as when code in function was inline - why?
Have you tried running it in
Ramit Prasad wrote:
You would be better off trying to run this from the command
line.
I just wanted to clarify on this. The reason you will have a better
results running this from the command line is that Python will
normally give you very good error traceback. An IDE might hide
or obscure
On 07/11/12 03:31, Prasad, Ramit wrote:
Steven D'Aprano wrote:
The isdigit method doesn't only work on a single character
at a time, it works on an entire string:
py 12345.isdigit()
True
py 12345a.isdigit()
False
I just want to point to the OP (Frank) that this only works for digits
i.e.