numberswe'll defer discussion of these types until later in this and book so farwe've been using python much like simple calculatorto do better justice to its built-in typeslet' move on to explore strings strings strings are used to record both textual information (your namefor instanceas well as arbitrary collections of bytes (such as an image file' contentsthey are our first example of what in python we call sequence-- positionally ordered collection of other objects sequences maintain left-to-right order among the items they containtheir items are stored and fetched by their relative positions strictly speakingstrings are sequences of one-character stringsothermore general sequence types include lists and tuplescovered later sequence operations as sequencesstrings support operations that assume positional ordering among items for exampleif we have four-character string coded inside quotes (usually of the single variety)we can verify its length with the built-in len function and fetch its components with indexing expressionss 'spamlen( [ 'ss[ 'pmake -character stringand assign it to name length the first item in sindexing by zero-based position the second item from the left in pythonindexes are coded as offsets from the frontand so start from the first item is at index the second is at index and so on notice how we assign the string to variable named here we'll go into detail on how this works later (especially in )but python variables never need to be declared ahead of time variable is created when you assign it valuemay be assigned any type of objectand is replaced with its value when it shows up in an expression it must also have been previously assigned by the time you use its value for the purposes of this it' enough to know that we need to assign an object to variable in order to save it for later use in pythonwe can also index backwardfrom the end--positive indexes count from the leftand negative indexes count back from the rights[- 'ms[- 'athe last item from the end in the second-to-last item from the end strings