Am Sonntag 21 Mai 2006 22:52 schrieb BJ Swope:
> district_combo=line[85:3]
This returns the slice from character 85 to character 3 in the string, read
forwards. Basically, as Python slices are forgiving (because the borders are
actually "illogical"), this amounts to nothing, but could also amount
to: "your indexing boundaries are invalid."
Basically, what you want is:
district_combo = line[85:88]
where 88 = 85 + 3 (3 being the length). Read up on Python slices...
--- Heiko.
--
http://mail.python.org/mailman/listinfo/python-list
Heiko,
Thank you. I was thinking like mysql for the indexs. Thinking start at 85 and go for 3 characters instead of like python start at x and go up to and including y.
The pages I had googled showed examples that were less than clear ;)
BJ
--
We are all slave to our own paradigm. -- Joshua Williams
-- http://mail.python.org/mailman/listinfo/python-list