Alex Dempsey wrote:
> Recently I tried to slice every element of a list of strings. First I tried:
>
> f = open("export.xls", "r")
http://www.python.org/doc/2.4.1/lib/module-csv.html
(snip, see other posts in this thread)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for
Alex Dempsey wrote:
> Recently I tried to slice every element of a list of strings. First I tried:
"slice"? Interesting terminology. Next problem you have, try posting an
example of your input, and your expected output.
E.g.
repr(input_string): '"foo"\t"barre"\t"zot"\t"X"\n'
repr(output_list): [
Alex Dempsey wrote:
> for line in lines:
> line = line[1:-5]
> line = line.split('\"\t\"')
>
> This went without returning any errors, but nothing was sliced or split.
> Next I tried:
>
> for i in range(len(lines)):
> lines[i] = lines[i][1:-5]
> lines[i] = lines[i].split('\"\t\"'
Alex Dempsey wrote:
> Recently I tried to slice every element of a list of strings. First I tried:
>
> f = open("export.xls", "r")
> lines = f.readlines()
>
> for line in lines:
> line = line[1:-5]
> line = line.split('\"\t\"')
>
> This went without returning any errors, but nothing was
Gary Herron wrote:
> Alex Dempsey wrote:
>> for line in lines:
>>line = line[1:-5]
>>line = line.split('\"\t\"')
> This, in fact, did do the operation you expected, but after creating the
> new value and assigning it to line, you promptly threw it away. (Because
> the loop then went back
Alex Dempsey wrote:
>Recently I tried to slice every element of a list of strings. First I tried:
>
>f = open("export.xls", "r")
>lines = f.readlines()
>
>for line in lines:
>line = line[1:-5]
>line = line.split('\"\t\"')
>
>
This, in fact, did do the operation you expected, but after cr
Recently I tried to slice every element of a list of strings. First I tried:
f = open("export.xls", "r")
lines = f.readlines()
for line in lines:
line = line[1:-5]
line = line.split('\"\t\"')
This went without returning any errors, but nothing was sliced or
split. Next I tried:
for i in