table continued splits string into list of lines if keepends is trailing newlines are preserved startswith(prefix [,start [,end]]checks whether string starts with prefix strip([chrs]removes leading and trailing whitespace or characters supplied in chrs swapcase(converts uppercase to lowercaseand vice versa title(returns title-cased version of the string translate(table [,deletechars]translates string using character translation table tableremoving characters in deletechars upper(converts string to uppercase zfill(widthpads string with zeros on the left up to the specified width splitlines([keepends]xrange(objects the built-in function xrange([ ,] [,stride]creates an object that represents range of integers such that < the first indexiand the stride are optional and have default values of and respectively an xrange object calculates its values whenever it' accessed and although an xrange object looks like sequenceit is actually somewhat limited for examplenone of the standard slicing operations are supported this limits the utility of xrange to only few applications such as iterating in simple loops it should be noted that in python xrange(has been renamed to range(howeverit operates in exactly the same manner as described here mapping types mapping object represents an arbitrary collection of objects that are indexed by another collection of nearly arbitrary key values unlike sequencea mapping object is unordered and can be indexed by numbersstringsand other objects mappings are mutable dictionaries are the only built-in mapping type and are python' version of hash table or associative array you can use any immutable object as dictionary key value (stringsnumberstuplesand so onlistsdictionariesand tuples containing mutable objects cannot be used as keys (the dictionary type requires key values to remain constantto select an item in mapping objectuse the key index operator [ ]where is key value if the key is not founda keyerror exception is raised the len(mfunction returns the number of items contained in mapping object table lists the methods and operations lib fl ff