On Fri, Aug 29, 2008 at 07:37:50PM +, Steven D'Aprano wrote:
> On Fri, 29 Aug 2008 14:46:53 -0400, Derek Martin wrote:
>
> > On Fri, Aug 29, 2008 at 07:28:40PM +0100, [EMAIL PROTECTED] wrote:
> >> dirListFinal = []
> >> for item in dirList:
> >>print item
> >>if item.en
On Fri, Aug 29, 2008 at 8:37 PM, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Fri, 29 Aug 2008 14:46:53 -0400, Derek Martin wrote:
>
>> On Fri, Aug 29, 2008 at 07:28:40PM +0100, [EMAIL PROTECTED] wrote:
>>> dirListFinal = []
>>> for item in dirList:
>>>print item
>>>if it
On Fri, 29 Aug 2008 14:46:53 -0400, Derek Martin wrote:
> On Fri, Aug 29, 2008 at 07:28:40PM +0100, [EMAIL PROTECTED] wrote:
>> dirListFinal = []
>> for item in dirList:
>>print item
>>if item.endswith('\\') == True:
>
> if item[-1] == '\\':
Which will fail b
[EMAIL PROTECTED] wrote:
There is just a single \ at the end of every item. My list is as below:
['Results v1.0/', 'Results v1.1/']
so,
if x.endswith('\\'):
is that correct?
if your list contains forward slashes, maybe you should test for forward
slashes and not backward slashes.
--
ht
On Fri, Aug 29, 2008 at 7:59 PM, <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 29, 2008 at 7:41 PM, Mike Driscoll <[EMAIL PROTECTED]> wrote:
>> On Aug 29, 1:28 pm, [EMAIL PROTECTED] wrote:
>>> Sorry : Earlier mail had a typo in Subject line which might look
>>> in-appropriate to my friends
>>>
>>> Hi,
On Fri, Aug 29, 2008 at 7:41 PM, Mike Driscoll <[EMAIL PROTECTED]> wrote:
> On Aug 29, 1:28 pm, [EMAIL PROTECTED] wrote:
>> Sorry : Earlier mail had a typo in Subject line which might look
>> in-appropriate to my friends
>>
>> Hi,
>>
>> I've a list some of whose elements with character \.
>> I want
[EMAIL PROTECTED] wrote:
I've a list some of whose elements with character \.
I want to delete this last character from the elements that have this
character set at their end,
I have written a small program, unfortunately this does not work:
dirListFinal = []
for item in dirList:
pr
On Fri, Aug 29, 2008 at 07:28:40PM +0100, [EMAIL PROTECTED] wrote:
> dirListFinal = []
> for item in dirList:
>print item
>if item.endswith('\\') == True:
if item[-1] == '\\':
--
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0x81CFE75D
pgp5fVWPp4A
On Aug 29, 1:28 pm, [EMAIL PROTECTED] wrote:
> Sorry : Earlier mail had a typo in Subject line which might look
> in-appropriate to my friends
>
> Hi,
>
> I've a list some of whose elements with character \.
> I want to delete this last character from the elements that have this
> character set at
On Aug 29, 2:28 pm, [EMAIL PROTECTED] wrote:
> Sorry : Earlier mail had a typo in Subject line which might look
> in-appropriate to my friends
>
> Hi,
>
> I've a list some of whose elements with character \.
> I want to delete this last character from the elements that have this
> character set at
Sorry : Earlier mail had a typo in Subject line which might look
in-appropriate to my friends
Hi,
I've a list some of whose elements with character \.
I want to delete this last character from the elements that have this
character set at their end,
I have written a small program, unfortunately
11 matches
Mail list logo