Why does python return a list rather than a string in this case?
>>> mystr = "./test.py"
>>> print mystr.split('/')
['.', 'test.py']
>>> args = mystr.split('/')
>>> print args[-1:]
['test.py']
>>>
Thanks
Darragh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Python Ireland" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.ie/group/pythonireland?hl=en
-~----------~----~----~----~------~----~------~--~---