howeverout of range slice indexes are handled gracefully when used for slicingword[ : 'onword[ :'python strings cannot be changed -they are immutable thereforeassigning to an indexed position in the string results in an errorword[ 'jtypeerror'strobject does not support item assignment word[ :'pytypeerror'strobject does not support item assignment if you need different stringyou should create new one'jword[ :'jythonword[: 'py'pypythe built-in function len(returns the length of strings 'supercalifragilisticexpialidociouslen( see alsotextseq strings are examples of sequence typesand support the common operations supported by such types string-methods strings support large number of methods for basic transformations and searching -strings string literals that have embedded expressions formatstrings information about string formatting with str format(old-string-formatting the old formatting operations invoked when strings are the left operand of the operator are described in more detail here lists python knows number of compound data typesused to group together other values the most versatile is the listwhich can be written as list of comma-separated values (itemsbetween square brackets lists might contain items of different typesbut usually the items all have the same type squares [ squares [ like strings (and all other built-in sequence type)lists can be indexed and slicedsquares[ indexing returns the item squares[- (continues on next page an informal introduction to python