Pyglatin 10/11


So i’m trying to learn python for the last couple of days got to the pyglatin

this maybe a dumb question but what is [1:len(new_word)] ? can someone elaborate i already know len() but why did we have to write it like that how does it work?


its string slicing, if you want to have part of a string:

print "hello world"[0:6]

will give hello, the 0 is the start value (from where we want to start slicing, and 6 the stop value.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.