For the hell of it, same thing but with slightly different notation :)

bits = filter(None, toto.split("\\"))

-Anthony

On 8 Feb 2013, at 12:17, San Luthra wrote:

> how bout this , 
> 
> [each for each in toto.split("\\") if each][0]
> 
> though, its same as what Jeremy did !!
> 
> 
> On Thursday, 7 February 2013 05:47:33 UTC+5:30, Jeremy YeoKhoo  wrote:
>> Hi guys, 
>> 
>> Would anyone know how I can partition or rather grab a first element of a 
>> string of an escape character "\\"?
>> 
>> Say for an example...
>> toto= '\\titan\3D\work\Pitch\maya\scenes'
>> 
>> I want to grab 'titan' or the first element after the \\ and between the \ 
>> characters?
>> 
>> -Jeremy
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To post to this group, send email to python_inside_maya@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To post to this group, send email to python_inside_maya@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to