Split creates a list of the parts making up the original string. using a [:4] will call up the first 4 elements of the list. so for a list looking like this: [0, 1, 2, 3, 4, 5, 6] using [:4] will result in [0, 1, 2, 3]
Cheers, Ron Ganbar email: [email protected] tel: +44 (0)7968 007 309 [UK] +972 (0)54 255 9765 [Israel] url: http://ronganbar.wordpress.com/ On 15 May 2012 23:01, Noggy <[email protected]> wrote: > ** > I don't get what ('/')[:4] is doing at the end of .split. I'm assuming the > split command is taking the string and looking for '/' as the variable to > separate the string. What does [:4] do? > > _______________________________________________ > Nuke-python mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > >
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
