Re: python if and same instruction line not working

2020-10-04 Thread MRAB
On 2020-10-04 10:35, pascal z via Python-list wrote: On Tuesday, September 29, 2020 at 5:28:22 PM UTC+2, MRAB wrote: On 2020-09-29 15:42, pascal z via Python-list wrote: > I need to change the script commented out to the one not commented out. Why? > > # for x in sorted (fr, key=str.lower)

Re: python if and same instruction line not working

2020-10-04 Thread pascal z via Python-list
On Tuesday, September 29, 2020 at 5:28:22 PM UTC+2, MRAB wrote: > On 2020-09-29 15:42, pascal z via Python-list wrote: > > I need to change the script commented out to the one not commented out. Why? > > > > # for x in sorted (fr, key=str.lower): > > # tmpstr = x.rpartition(';')[2] >

Re: python if and same instruction line not working

2020-09-29 Thread MRAB
On 2020-09-29 15:42, pascal z via Python-list wrote: I need to change the script commented out to the one not commented out. Why? # for x in sorted (fr, key=str.lower): # tmpstr = x.rpartition(';')[2] # if x != csv_contents and tmpstr == "folder\n": # csv_cont

python if and same instruction line not working

2020-09-29 Thread pascal z via Python-list
I need to change the script commented out to the one not commented out. Why? # for x in sorted (fr, key=str.lower): # tmpstr = x.rpartition(';')[2] # if x != csv_contents and tmpstr == "folder\n": # csv_contentsB += x # elif x != csv_contents and tmpstr == "