Searched defs:the (Results 1 - 8 of 8) sorted by relevance

/external/dtc/Documentation/
H A Ddtc-paper.tex43 embedded machine. To do this, we supply the kernel with a compact
44 flattened-tree representation of the system's hardware based on the
48 The ``blob'' representing the device tree can be created using \dtc
49 --- the Device Tree Compiler --- that turns a simple text
50 representation of the tree into the compact representation used by
51 the kernel. The compiler can produce either a binary ``blob'' or an
55 This flattened-tree approach is now the only supported method of
57 to make it the onl
[all...]
/external/toolchain-utils/automation/server/monitor/
H A Dmanage.py11 import settings # Assumed to be in the same directory. namespace
15 sys.stderr.write('Error: Can\'t find settings.py file in the directory '
/external/jsoncpp/scons-tools/
H A Dsubstinfile.py2 from SCons.Script import * # the usual scons stuff you get in a SConscript namespace
7 Add builders and construction variables for the
10 Adds SubstInFile builder, which substitutes the keys->values of SUBST_DICT
11 from the source to the target.
15 the result is expanded as the value.
17 substituted from the corresponding source.
20 """Replace all instances of the keys of dict with their values.
22 then all instances of %VERSION% in the fil
[all...]
/external/python/cpython2/Lib/encodings/
H A Dbz2_codec.py3 Unlike most of the other codecs which target Unicode, this codec
11 import bz2 # this codec needs the optional bz2 module ! namespace
17 """ Encodes the object input and returns a tuple (output
20 errors defines the error handling to apply. It defaults to
21 'strict' handling which is the only currently supported
31 """ Decodes the object input and returns a tuple (output
34 input must be an object which provides the bf_getreadbuf
38 errors defines the error handling to apply. It defaults to
39 'strict' handling which is the only currently supported
H A Dzlib_codec.py3 Unlike most of the other codecs which target Unicode, this codec
10 import zlib # this codec needs the optional zlib module ! namespace
16 """ Encodes the object input and returns a tuple (output
19 errors defines the error handling to apply. It defaults to
20 'strict' handling which is the only currently supported
30 """ Decodes the object input and returns a tuple (output
33 input must be an object which provides the bf_getreadbuf
37 errors defines the error handling to apply. It defaults to
38 'strict' handling which is the only currently supported
/external/autotest/site_utils/
H A Ddump_to_cloudsql.py5 # found in the LICENSE file.
57 data: A line of data from the MySQL dump.
58 execute_cmd: Whether to execute the command, defaults to True.
74 """Closes the current database connection."""
95 """Connects to the Cloud SQL database and returns the connection.
98 A MySQLdb compatible database connection to the Cloud SQL instance.
104 sys.exit('Unable to import rdbms_googleapi. Add the AppEngine SDK ' namespace
105 'directory to your PYTHONPATH. Download the SDK from: '
120 """Connects to the loca
[all...]
/external/python/cpython2/Lib/
H A Dcookielib.py4 HTTP::Cookies, from the libwww-perl library.
6 Docstrings, comments and debug strings in this code refer to the
7 attributes of the HTTP cookie system as cookie-attributes, to distinguish
10 Class diagram (note that BSDDBCookieJar and the MSIE* classes are not
11 distributed with the Python standard library, but are available from
37 import httplib # only for the default HTTP port namespace
40 debug = False # set to True to enable debugging via the logging module
54 MISSING_FILENAME_TEXT = ("a filename was not supplied (nor was the CookieJar "
89 If the function is called without an argument, it will use the curren
[all...]
/external/python/cpython2/Lib/pydoc_data/
H A Dtopics.py3 topics = {'assert': u'\nThe "assert" statement\n**********************\n\nAssert statements are a convenient way to insert debugging assertions\ninto a program:\n\n assert_stmt ::= "assert" expression ["," expression]\n\nThe simple form, "assert expression", is equivalent to\n\n if __debug__:\n if not expression: raise AssertionError\n\nThe extended form, "assert expression1, expression2", is equivalent to\n\n if __debug__:\n if not expression1: raise AssertionError(expression2)\n\nThese equivalences assume that "__debug__" and "AssertionError" refer\nto the built-in variables with those names. In the current\nimplementation, the built-in variable "__debug__" is "True" under\nnormal circumstances, "False" when optimization is requested (command\nline option -O). The current code generator emits no code for an\nassert statement when optimization is requested at compile time. Note\nthat it is unnecessary to include the source code for the expression\nthat failed in the error message; it will be displayed as part of the\nstack trace.\n\nAssignments to "__debug__" are illegal. The value for the built-in\nvariable is determined when the interpreter starts.\n',
4 'assignment': u'\nAssignment statements\n*********************\n\nAssignment statements are used to (re)bind names to values and to\nmodify attributes or items of mutable objects:\n\n assignment_stmt ::= (target_list "=")+ (expression_list | yield_expression)\n target_list ::= target ("," target)* [","]\n target ::= identifier\n | "(" target_list ")"\n | "[" [target_list] "]"\n | attributeref\n | subscription\n | slicing\n\n(See section Primaries for the synta
27 'customization': u'\\nBasic customization\\n*******************\\n\\nobject.__new__(cls[, ...])\\n\\n Called to create a new instance of class *cls*. "__new__()" is a\\n static method (special-cased so you need not declare it as such)\\n that takes the class of which an instance was requested as its\\n first argument. The remaining arguments are those passed to the\\n object constructor expression (the call to the class). The return\\n value of "__new__()" should be the new object instance (usually an\\n instance of *cls*).\\n\\n Typical implementations create a new instance of the class by\\n invoking the superclass\\'s "__new__()" method using\\n "super(currentclass, cls).__new__(cls[, ...])" with appropriate\\n arguments and then modifying the newly-created instance as\\n necessary before returning it.\\n\\n If "__new__()" returns an instance of *cls*, then the new\\n instance\\'s "__init__()" method will be invoked like\\n "__init__(self[, ...])", where *self* is the new instance and the\\n remaining arguments are the same as were passed to "__new__()".\\n\\n If "__new__()" does not return an instance of *cls*, then the new\\n instance\\'s "__init__()" method will not be invoked.\\n\\n "__new__()" is intended mainly to allow subclasses of immutable\\n types (like int, str, or tuple) to customize instance creation. It\\n is also commonly overridden in custom metaclasses in order to\\n customize class creation.\\n\\nobject.__init__(self[, ...])\\n\\n Called after the instance has been created (by "__new__()"), but\\n before it is returned to the caller. The arguments are those\\n passed to the class constructor expression. If a base class has an\\n "__init__()" method, the derived class\\'s "__init__()" method, if\\n any, must explicitly call it to ensure proper initialization of the\\n base class part of the instance; for example:\\n "BaseClass.__init__(self, [args...])".\\n\\n Because "__new__()" and "__init__()" work together in constructing\\n objects ("__new__()" to create it, and "__init__()" to customise\\n it), no non-"None" value may be returned by "__init__()"; doing so\\n will cause a "TypeError" to be raised at runtime.\\n\\nobject.__del__(self)\\n\\n Called when the instance is about to be destroyed. This is also\\n called a destructor. If a base class has a "__del__()" method, the\\n derived class\\'s "__del__()" method, if any, must explicitly call it\\n to ensure proper deletion of the base class part of the instance.\\n Note that it is possible (though not recommended!) for the\\n "__del__()" method to postpone destruction of the instance by\\n creating a new reference to it. It may then be called at a later\\n time when this new reference is deleted. It is not guaranteed that\\n "__del__()" methods are called for objects that still exist when\\n the interpreter exits.\\n\\n Note: "del x" doesn\\'t directly call "x.__del__()" --- the former\\n decrements the reference count for "x" by one, and the latter is\\n only called when "x"\\'s reference count reaches zero. Some common\\n situations that may prevent the reference count of an object from\\n going to zero include: circular references between objects (e.g.,\\n a doubly-linked list or a tree data structure with parent and\\n child pointers); a reference to the object on the stack frame of\\n a function that caught an exception (the traceback stored in\\n "sys.exc_traceback" keeps the stack frame alive); or a reference\\n to the object on the stack frame that raised an unhandled\\n exception in interactive mode (the traceback stored in\\n "sys.last_traceback" keeps the stack frame alive). The first\\n situation can only be remedied by explicitly breaking the cycles;\\n the latter two situations can be resolved by storing "None" in\\n "sys.exc_traceback" or "sys.last_traceback". Circular references\\n which are garbage are detected when the option cycle detector is\\n enabled (it\\'s on by default), but can only be cleaned up if there\\n are no Python-level "__del__()" methods involved. Refer to the\\n documentation for the "gc" module for more information about how\\n "__del__()" methods are handled by the cycle detector,\\n particularly the description of the "garbage" value.\\n\\n Warning: Due to the precarious circumstances under which\\n "__del__()" methods are invoked, exceptions that occur during\\n their execution are ignored, and a warning is printed to\\n "sys.stderr" instead. Also, when "__del__()" is invoked in\\n response to a module being deleted (e.g., when execution of the\\n program is done), other globals referenced by the "__del__()"\\n method may already have been deleted or in the process of being\\n torn down (e.g. the import machinery shutting down). For this\\n reason, "__del__()" methods should do the absolute minimum needed\\n to maintain external invariants. Starting with version 1.5,\\n Python guarantees that globals whose name begins with a single\\n underscore are deleted from their module before other globals are\\n deleted; if no other references to such globals exist, this may\\n help in assuring that imported modules are still available at the\\n time when the "__del__()" method is called.\\n\\n See also the "-R" command-line option.\\n\\nobject.__repr__(self)\\n\\n Called by the "repr()" built-in function and by string conversions\\n (reverse quotes) to compute the "official" string representation of\\n an object. If at all possible, this should look like a valid\\n Python expression that could be used to recreate an object with the\\n same value (given an appropriate environment). If this is not\\n possible, a string of the form "<...some useful description...>"\\n should be returned. The return value must be a string object. If a\\n class defines "__repr__()" but not "__str__()", then "__repr__()"\\n is also used when an "informal" string representation of instances\\n of that class is required.\\n\\n This is typically used for debugging, so it is important that the\\n representation is information-rich and unambiguous.\\n\\nobject.__str__(self)\\n\\n Called by the "str()" built-in function and by the "print"\\n statement to compute the "informal" string representation of an\\n object. This differs from "__repr__()" in that it does not have to\\n be a valid Python expression: a more convenient or concise\\n representation may be used instead. The return value must be a\\n string object.\\n\\nobject.__lt__(self, other)\\nobject.__le__(self, other)\\nobject.__eq__(self, other)\\nobject.__ne__(self, other)\\nobject.__gt__(self, other)\\nobject.__ge__(self, other)\\n\\n New in version 2.1.\\n\\n These are the so-called "rich comparison" methods, and are called\\n for comparison operators in preference to "__cmp__()" below. The\\n correspondence between operator symbols and method names is as\\n follows: "x<y" calls "x.__lt__(y)", "x<=y" calls "x.__le__(y)",\\n "x==y" calls "x.__eq__(y)", "x!=y" and "x<>y" call "x.__ne__(y)",\\n "x>y" calls "x.__gt__(y)", and "x>=y" calls "x.__ge__(y)".\\n\\n A rich comparison method may return the singleton "NotImplemented"\\n if it does not implement the operation for a given pair of\\n arguments. By convention, "False" and "True" are returned for a\\n successful comparison. However, these methods can return any value,\\n so if the comparison operator is used in a Boolean context (e.g.,\\n in the condition of an "if" statement), Python will call "bool()"\\n on the value to determine if the result is true or false.\\n\\n There are no implied relationships among the comparison operators.\\n The truth of "x==y" does not imply that "x!=y" is false.\\n Accordingly, when defining "__eq__()", one should also define\\n "__ne__()" so that the operators will behave as expected. See the\\n paragraph on "__hash__()" for some important notes on creating\\n *hashable* objects which support custom comparison operations and\\n are usable as dictionary keys.\\n\\n There are no swapped-argument versions of these methods (to be used\\n when the left argument does not support the operation but the right\\n argument does); rather, "__lt__()" and "__gt__()" are each other\\'s\\n reflection, "__le__()" and "__ge__()" are each other\\'s reflection,\\n and "__eq__()" and "__ne__()" are their own reflection.\\n\\n Arguments to rich comparison methods are never coerced.\\n\\n To automatically generate ordering operations from a single root\\n operation, see "functools.total_ordering()".\\n\\nobject.__cmp__(self, other)\\n\\n Called by comparison operations if rich comparison (see above) is\\n not defined. Should return a negative integer if "self < other",\\n zero if "self == other", a positive integer if "self > other". If\\n no "__cmp__()", "__eq__()" or "__ne__()" operation is defined,\\n class instances are compared by object identity ("address"). See\\n also the description of "__hash__()" for some important notes on\\n creating *hashable* objects which support custom comparison\\n operations and are usable as dictionary keys. (Note: the\\n restriction that exceptions are not propagated by "__cmp__()" has\\n been removed since Python 1.5.)\\n\\nobject.__rcmp__(self, other)\\n\\n Changed in version 2.1: No longer supported.\\n\\nobject.__hash__(self)\\n\\n Called by built-in function "hash()" and for operations on members\\n of hashed collections including "set", "frozenset", and "dict".\\n "__hash__()" should return an integer. The only required property\\n is that objects which compare equal have the same hash value; it is\\n advised to somehow mix together (e.g. using exclusive or) the hash\\n values for the components of the object that also play a part in\\n comparison of objects.\\n\\n If a class does not define a "__cmp__()" or "__eq__()" method it\\n should not define a "__hash__()" operation either; if it defines\\n "__cmp__()" or "__eq__()" but not "__hash__()", its instances will\\n not be usable in hashed collections. If a class defines mutable\\n objects and implements a "__cmp__()" or "__eq__()" method, it\\n should not implement "__hash__()", since hashable collection\\n implementations require that an object\\'s hash value is immutable\\n (if the object\\'s hash value changes, it will be in the wrong hash\\n bucket).\\n\\n User-defined classes have "__cmp__()" and "__hash__()" methods by\\n default; with them, all objects compare unequal (except with\\n themselves) and "x.__hash__()" returns a result derived from\\n "id(x)".\\n\\n Classes which inherit a "__hash__()" method from a parent class but\\n change the meaning of "__cmp__()" or "__eq__()" such that the hash\\n value returned is no longer appropriate (e.g. by switching to a\\n value-based concept of equality instead of the default identity\\n based equality) can explicitly flag themselves as being unhashable\\n by setting "__hash__ = None" in the class definition. Doing so\\n means that not only will instances of the class raise an\\n appropriate "TypeError" when a program attempts to retrieve their\\n hash value, but they will also be correctly identified as\\n unhashable when checking "isinstance(obj, collections.Hashable)"\\n (unlike classes which define their own "__hash__()" to explicitly\\n raise "TypeError").\\n\\n Changed in version 2.5: "__hash__()" may now also return a long\\n integer object; the 32-bit integer is then derived from the hash of\\n that object.\\n\\n Changed in version 2.6: "__hash__" may now be set to "None" to\\n explicitly flag instances of a class as unhashable.\\n\\nobject.__nonzero__(self)\\n\\n Called to implement truth value testing and the built-in operation\\n "bool()"; should return "False" or "True", or their integer\\n equivalents "0" or "1". When this method is not defined,\\n "__len__()" is called, if it is defined, and the object is\\n considered true if its result is nonzero. If a class defines\\n neither "__len__()" nor "__nonzero__()", all its instances are\\n considered true.\\n\\nobject.__unicode__(self)\\n\\n Called to implement "unicode()" built-in; should return a Unicode\\n object. When this method is not defined, string conversion is\\n attempted, and the result of string conversion is converted to\\n Unicode using the system default encoding.\\n', namespace
31 'dynamic-features': u'\\nInteraction with dynamic features\\n*********************************\\n\\nThere are several cases where Python statements are illegal when used\\nin conjunction with nested scopes that contain free variables.\\n\\nIf a variable is referenced in an enclosing scope, it is illegal to\\ndelete the name. An error will be reported at compile time.\\n\\nIf the wild card form of import --- "import *" --- is used in a\\nfunction and the function contains or is a nested block with free\\nvariables, the compiler will raise a "SyntaxError".\\n\\nIf "exec" is used in a function and the function contains or is a\\nnested block with free variables, the compiler will raise a\\n"SyntaxError" unless the exec explicitly specifies the local namespace\\nfor the "exec". (In other words, "exec obj" would be illegal, but\\n"exec obj in ns" would be legal.)\\n\\nThe "eval()", "execfile()", and "input()" functions and the "exec"\\nstatement do not have access to the full environment for resolving\\nnames. Names may be resolved in the local and global namespaces of\\nthe caller. Free variables are not resolved in the nearest enclosing\\nnamespace, but in the global namespace. [1] The "exec" statement and\\nthe "eval()" and "execfile()" functions have optional arguments to\\noverride the global and local namespace. If only one namespace is\\nspecified, it is used for both.\\n', namespace
43 'identifiers': u'\\nIdentifiers and keywords\\n************************\\n\\nIdentifiers (also referred to as *names*) are described by the\\nfollowing lexical definitions:\\n\\n identifier ::= (letter|"_") (letter | digit | "_")*\\n letter ::= lowercase | uppercase\\n lowercase ::= "a"..."z"\\n uppercase ::= "A"..."Z"\\n digit ::= "0"..."9"\\n\\nIdentifiers are unlimited in length. Case is significant.\\n\\n\\nKeywords\\n========\\n\\nThe following identifiers are used as reserved words, or *keywords* of\\nthe language, and cannot be used as ordinary identifiers. They must\\nbe spelled exactly as written here:\\n\\n and del from not while\\n as elif global or with\\n assert else if pass yield\\n break except import print\\n class exec in raise\\n continue finally is return\\n def for lambda try\\n\\nChanged in version 2.4: "None" became a constant and is now recognized\\nby the compiler as a name for the built-in object "None". Although it\\nis not a keyword, you cannot assign a different object to it.\\n\\nChanged in version 2.5: Using "as" and "with" as identifiers triggers\\na warning. To use them as keywords, enable the "with_statement"\\nfuture feature .\\n\\nChanged in version 2.6: "as" and "with" are full keywords.\\n\\n\\nReserved classes of identifiers\\n===============================\\n\\nCertain classes of identifiers (besides keywords) have special\\nmeanings. These classes are identified by the patterns of leading and\\ntrailing underscore characters:\\n\\n"_*"\\n Not imported by "from module import *". The special identifier "_"\\n is used in the interactive interpreter to store the result of the\\n last evaluation; it is stored in the "__builtin__" module. When\\n not in interactive mode, "_" has no special meaning and is not\\n defined. See section The import statement.\\n\\n Note: The name "_" is often used in conjunction with\\n internationalization; refer to the documentation for the\\n "gettext" module for more information on this convention.\\n\\n"__*__"\\n System-defined names. These names are defined by the interpreter\\n and its implementation (including the standard library). Current\\n system names are discussed in the Special method names section and\\n elsewhere. More will likely be defined in future versions of\\n Python. *Any* use of "__*__" names, in any context, that does not\\n follow explicitly documented use, is subject to breakage without\\n warning.\\n\\n"__*"\\n Class-private names. Names in this category, when used within the\\n context of a class definition, are re-written to use a mangled form\\n to help avoid name clashes between "private" attributes of base and\\n derived classes. See section Identifiers (Names).\\n', namespace
66 'string-methods': u'\\nString Methods\\n**************\\n\\nBelow are listed the string methods which both 8-bit strings and\\nUnicode objects support. Some of them are also available on\\n"bytearray" objects.\\n\\nIn addition, Python\\'s strings support the sequence type methods\\ndescribed in the Sequence Types --- str, unicode, list, tuple,\\nbytearray, buffer, xrange section. To output formatted strings use\\ntemplate strings or the "%" operator described in the String\\nFormatting Operations section. Also, see the "re" module for string\\nfunctions based on regular expressions.\\n\\nstr.capitalize()\\n\\n Return a copy of the string with its first character capitalized\\n and the rest lowercased.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.center(width[, fillchar])\\n\\n Return centered in a string of length *width*. Padding is done\\n using the specified *fillchar* (default is a space).\\n\\n Changed in version 2.4: Support for the *fillchar* argument.\\n\\nstr.count(sub[, start[, end]])\\n\\n Return the number of non-overlapping occurrences of substring *sub*\\n in the range [*start*, *end*]. Optional arguments *start* and\\n *end* are interpreted as in slice notation.\\n\\nstr.decode([encoding[, errors]])\\n\\n Decodes the string using the codec registered for *encoding*.\\n *encoding* defaults to the default string encoding. *errors* may\\n be given to set a different error handling scheme. The default is\\n "\\'strict\\'", meaning that encoding errors raise "UnicodeError".\\n Other possible values are "\\'ignore\\'", "\\'replace\\'" and any other\\n name registered via "codecs.register_error()", see section Codec\\n Base Classes.\\n\\n New in version 2.2.\\n\\n Changed in version 2.3: Support for other error handling schemes\\n added.\\n\\n Changed in version 2.7: Support for keyword arguments added.\\n\\nstr.encode([encoding[, errors]])\\n\\n Return an encoded version of the string. Default encoding is the\\n current default string encoding. *errors* may be given to set a\\n different error handling scheme. The default for *errors* is\\n "\\'strict\\'", meaning that encoding errors raise a "UnicodeError".\\n Other possible values are "\\'ignore\\'", "\\'replace\\'",\\n "\\'xmlcharrefreplace\\'", "\\'backslashreplace\\'" and any other name\\n registered via "codecs.register_error()", see section Codec Base\\n Classes. For a list of possible encodings, see section Standard\\n Encodings.\\n\\n New in version 2.0.\\n\\n Changed in version 2.3: Support for "\\'xmlcharrefreplace\\'" and\\n "\\'backslashreplace\\'" and other error handling schemes added.\\n\\n Changed in version 2.7: Support for keyword arguments added.\\n\\nstr.endswith(suffix[, start[, end]])\\n\\n Return "True" if the string ends with the specified *suffix*,\\n otherwise return "False". *suffix* can also be a tuple of suffixes\\n to look for. With optional *start*, test beginning at that\\n position. With optional *end*, stop comparing at that position.\\n\\n Changed in version 2.5: Accept tuples as *suffix*.\\n\\nstr.expandtabs([tabsize])\\n\\n Return a copy of the string where all tab characters are replaced\\n by one or more spaces, depending on the current column and the\\n given tab size. Tab positions occur every *tabsize* characters\\n (default is 8, giving tab positions at columns 0, 8, 16 and so on).\\n To expand the string, the current column is set to zero and the\\n string is examined character by character. If the character is a\\n tab ("\\\\t"), one or more space characters are inserted in the result\\n until the current column is equal to the next tab position. (The\\n tab character itself is not copied.) If the character is a newline\\n ("\\\\n") or return ("\\\\r"), it is copied and the current column is\\n reset to zero. Any other character is copied unchanged and the\\n current column is incremented by one regardless of how the\\n character is represented when printed.\\n\\n >>> \\'01\\\\t012\\\\t0123\\\\t01234\\'.expandtabs()\\n \\'01 012 0123 01234\\'\\n >>> \\'01\\\\t012\\\\t0123\\\\t01234\\'.expandtabs(4)\\n \\'01 012 0123 01234\\'\\n\\nstr.find(sub[, start[, end]])\\n\\n Return the lowest index in the string where substring *sub* is\\n found within the slice "s[start:end]". Optional arguments *start*\\n and *end* are interpreted as in slice notation. Return "-1" if\\n *sub* is not found.\\n\\n Note: The "find()" method should be used only if you need to know\\n the position of *sub*. To check if *sub* is a substring or not,\\n use the "in" operator:\\n\\n >>> \\'Py\\' in \\'Python\\'\\n True\\n\\nstr.format(*args, **kwargs)\\n\\n Perform a string formatting operation. The string on which this\\n method is called can contain literal text or replacement fields\\n delimited by braces "{}". Each replacement field contains either\\n the numeric index of a positional argument, or the name of a\\n keyword argument. Returns a copy of the string where each\\n replacement field is replaced with the string value of the\\n corresponding argument.\\n\\n >>> "The sum of 1 + 2 is {0}".format(1+2)\\n \\'The sum of 1 + 2 is 3\\'\\n\\n See Format String Syntax for a description of the various\\n formatting options that can be specified in format strings.\\n\\n This method of string formatting is the new standard in Python 3,\\n and should be preferred to the "%" formatting described in String\\n Formatting Operations in new code.\\n\\n New in version 2.6.\\n\\nstr.index(sub[, start[, end]])\\n\\n Like "find()", but raise "ValueError" when the substring is not\\n found.\\n\\nstr.isalnum()\\n\\n Return true if all characters in the string are alphanumeric and\\n there is at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isalpha()\\n\\n Return true if all characters in the string are alphabetic and\\n there is at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isdigit()\\n\\n Return true if all characters in the string are digits and there is\\n at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.islower()\\n\\n Return true if all cased characters [4] in the string are lowercase\\n and there is at least one cased character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isspace()\\n\\n Return true if there are only whitespace characters in the string\\n and there is at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.istitle()\\n\\n Return true if the string is a titlecased string and there is at\\n least one character, for example uppercase characters may only\\n follow uncased characters and lowercase characters only cased ones.\\n Return false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isupper()\\n\\n Return true if all cased characters [4] in the string are uppercase\\n and there is at least one cased character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.join(iterable)\\n\\n Return a string which is the concatenation of the strings in the\\n *iterable* *iterable*. The separator between elements is the\\n string providing this method.\\n\\nstr.ljust(width[, fillchar])\\n\\n Return the string left justified in a string of length *width*.\\n Padding is done using the specified *fillchar* (default is a\\n space). The original string is returned if *width* is less than or\\n equal to "len(s)".\\n\\n Changed in version 2.4: Support for the *fillchar* argument.\\n\\nstr.lower()\\n\\n Return a copy of the string with all the cased characters [4]\\n converted to lowercase.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.lstrip([chars])\\n\\n Return a copy of the string with leading characters removed. The\\n *chars* argument is a string specifying the set of characters to be\\n removed. If omitted or "None", the *chars* argument defaults to\\n removing whitespace. The *chars* argument is not a prefix; rather,\\n all combinations of its values are stripped:\\n\\n >>> \\' spacious \\'.lstrip()\\n \\'spacious \\'\\n >>> \\'www.example.com\\'.lstrip(\\'cmowz.\\')\\n \\'example.com\\'\\n\\n Changed in version 2.2.2: Support for the *chars* argument.\\n\\nstr.partition(sep)\\n\\n Split the string at the first occurrence of *sep*, and return a\\n 3-tuple containing the part before the separator, the separator\\n itself, and the part after the separator. If the separator is not\\n found, return a 3-tuple containing the string itself, followed by\\n two empty strings.\\n\\n New in version 2.5.\\n\\nstr.replace(old, new[, count])\\n\\n Return a copy of the string with all occurrences of substring *old*\\n replaced by *new*. If the optional argument *count* is given, only\\n the first *count* occurrences are replaced.\\n\\nstr.rfind(sub[, start[, end]])\\n\\n Return the highest index in the string where substring *sub* is\\n found, such that *sub* is contained within "s[start:end]".\\n Optional arguments *start* and *end* are interpreted as in slice\\n notation. Return "-1" on failure.\\n\\nstr.rindex(sub[, start[, end]])\\n\\n Like "rfind()" but raises "ValueError" when the substring *sub* is\\n not found.\\n\\nstr.rjust(width[, fillchar])\\n\\n Return the string right justified in a string of length *width*.\\n Padding is done using the specified *fillchar* (default is a\\n space). The original string is returned if *width* is less than or\\n equal to "len(s)".\\n\\n Changed in version 2.4: Support for the *fillchar* argument.\\n\\nstr.rpartition(sep)\\n\\n Split the string at the last occurrence of *sep*, and return a\\n 3-tuple containing the part before the separator, the separator\\n itself, and the part after the separator. If the separator is not\\n found, return a 3-tuple containing two empty strings, followed by\\n the string itself.\\n\\n New in version 2.5.\\n\\nstr.rsplit([sep[, maxsplit]])\\n\\n Return a list of the words in the string, using *sep* as the\\n delimiter string. If *maxsplit* is given, at most *maxsplit* splits\\n are done, the *rightmost* ones. If *sep* is not specified or\\n "None", any whitespace string is a separator. Except for splitting\\n from the right, "rsplit()" behaves like "split()" which is\\n described in detail below.\\n\\n New in version 2.4.\\n\\nstr.rstrip([chars])\\n\\n Return a copy of the string with trailing characters removed. The\\n *chars* argument is a string specifying the set of characters to be\\n removed. If omitted or "None", the *chars* argument defaults to\\n removing whitespace. The *chars* argument is not a suffix; rather,\\n all combinations of its values are stripped:\\n\\n >>> \\' spacious \\'.rstrip()\\n \\' spacious\\'\\n >>> \\'mississippi\\'.rstrip(\\'ipz\\')\\n \\'mississ\\'\\n\\n Changed in version 2.2.2: Support for the *chars* argument.\\n\\nstr.split([sep[, maxsplit]])\\n\\n Return a list of the words in the string, using *sep* as the\\n delimiter string. If *maxsplit* is given, at most *maxsplit*\\n splits are done (thus, the list will have at most "maxsplit+1"\\n elements). If *maxsplit* is not specified or "-1", then there is\\n no limit on the number of splits (all possible splits are made).\\n\\n If *sep* is given, consecutive delimiters are not grouped together\\n and are deemed to delimit empty strings (for example,\\n "\\'1,,2\\'.split(\\',\\')" returns "[\\'1\\', \\'\\', \\'2\\']"). The *sep* argument\\n may consist of multiple characters (for example,\\n "\\'1<>2<>3\\'.split(\\'<>\\')" returns "[\\'1\\', \\'2\\', \\'3\\']"). Splitting an\\n empty string with a specified separator returns "[\\'\\']".\\n\\n If *sep* is not specified or is "None", a different splitting\\n algorithm is applied: runs of consecutive whitespace are regarded\\n as a single separator, and the result will contain no empty strings\\n at the start or end if the string has leading or trailing\\n whitespace. Consequently, splitting an empty string or a string\\n consisting of just whitespace with a "None" separator returns "[]".\\n\\n For example, "\\' 1 2 3 \\'.split()" returns "[\\'1\\', \\'2\\', \\'3\\']", and\\n "\\' 1 2 3 \\'.split(None, 1)" returns "[\\'1\\', \\'2 3 \\']".\\n\\nstr.splitlines([keepends])\\n\\n Return a list of the lines in the string, breaking at line\\n boundaries. This method uses the *universal newlines* approach to\\n splitting lines. Line breaks are not included in the resulting list\\n unless *keepends* is given and true.\\n\\n Python recognizes ""\\\\r"", ""\\\\n"", and ""\\\\r\\\\n"" as line boundaries\\n for 8-bit strings.\\n\\n For example:\\n\\n >>> \\'ab c\\\\n\\\\nde fg\\\\rkl\\\\r\\\\n\\'.splitlines()\\n [\\'ab c\\', \\'\\', \\'de fg\\', \\'kl\\']\\n >>> \\'ab c\\\\n\\\\nde fg\\\\rkl\\\\r\\\\n\\'.splitlines(True)\\n [\\'ab c\\\\n\\', \\'\\\\n\\', \\'de fg\\\\r\\', \\'kl\\\\r\\\\n\\']\\n\\n Unlike "split()" when a delimiter string *sep* is given, this\\n method returns an empty list for the empty string, and a terminal\\n line break does not result in an extra line:\\n\\n >>> "".splitlines()\\n []\\n >>> "One line\\\\n".splitlines()\\n [\\'One line\\']\\n\\n For comparison, "split(\\'\\\\n\\')" gives:\\n\\n >>> \\'\\'.split(\\'\\\\n\\')\\n [\\'\\']\\n >>> \\'Two lines\\\\n\\'.split(\\'\\\\n\\')\\n [\\'Two lines\\', \\'\\']\\n\\nunicode.splitlines([keepends])\\n\\n Return a list of the lines in the string, like "str.splitlines()".\\n However, the Unicode method splits on the following line\\n boundaries, which are a superset of the *universal newlines*\\n recognized for 8-bit strings.\\n\\n +-------------------------+-------------------------------+\\n | Representation | Description |\\n +=========================+===============================+\\n | "\\\\n" | Line Feed |\\n +-------------------------+-------------------------------+\\n | "\\\\r" | Carriage Return |\\n +-------------------------+-------------------------------+\\n | "\\\\r\\\\n" | Carriage Return + Line Feed |\\n +-------------------------+-------------------------------+\\n | "\\\\v" or "\\\\x0b" | Line Tabulation |\\n +-------------------------+-------------------------------+\\n | "\\\\f" or "\\\\x0c" | Form Feed |\\n +-------------------------+-------------------------------+\\n | "\\\\x1c" | File Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\x1d" | Group Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\x1e" | Record Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\x85" | Next Line (C1 Control Code) |\\n +-------------------------+-------------------------------+\\n | "\\\\u2028" | Line Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\u2029" | Paragraph Separator |\\n +-------------------------+-------------------------------+\\n\\n Changed in version 2.7: "\\\\v" and "\\\\f" added to list of line\\n boundaries.\\n\\nstr.startswith(prefix[, start[, end]])\\n\\n Return "True" if string starts with the *prefix*, otherwise return\\n "False". *prefix* can also be a tuple of prefixes to look for.\\n With optional *start*, test string beginning at that position.\\n With optional *end*, stop comparing string at that position.\\n\\n Changed in version 2.5: Accept tuples as *prefix*.\\n\\nstr.strip([chars])\\n\\n Return a copy of the string with the leading and trailing\\n characters removed. The *chars* argument is a string specifying the\\n set of characters to be removed. If omitted or "None", the *chars*\\n argument defaults to removing whitespace. The *chars* argument is\\n not a prefix or suffix; rather, all combinations of its values are\\n stripped:\\n\\n >>> \\' spacious \\'.strip()\\n \\'spacious\\'\\n >>> \\'www.example.com\\'.strip(\\'cmowz.\\')\\n \\'example\\'\\n\\n Changed in version 2.2.2: Support for the *chars* argument.\\n\\nstr.swapcase()\\n\\n Return a copy of the string with uppercase characters converted to\\n lowercase and vice versa.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.title()\\n\\n Return a titlecased version of the string where words start with an\\n uppercase character and the remaining characters are lowercase.\\n\\n The algorithm uses a simple language-independent definition of a\\n word as groups of consecutive letters. The definition works in\\n many contexts but it means that apostrophes in contractions and\\n possessives form word boundaries, which may not be the desired\\n result:\\n\\n >>> "they\\'re bill\\'s friends from the UK".title()\\n "They\\'Re Bill\\'S Friends From The Uk"\\n\\n A workaround for apostrophes can be constructed using regular\\n expressions:\\n\\n >>> import re\\n >>> def titlecase(s):\\n ... return re.sub(r"[A-Za-z]+(\\'[A-Za-z]+)?",\\n ... lambda mo: mo.group(0)[0].upper() +\\n ... mo.group(0)[1:].lower(),\\n ... s)\\n ...\\n >>> titlecase("they\\'re bill\\'s friends.")\\n "They\\'re Bill\\'s Friends."\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.translate(table[, deletechars])\\n\\n Return a copy of the string where all characters occurring in the\\n optional argument *deletechars* are removed, and the remaining\\n characters have been mapped through the given translation table,\\n which must be a string of length 256.\\n\\n You can use the "maketrans()" helper function in the "string"\\n module to create a translation table. For string objects, set the\\n *table* argument to "None" for translations that only delete\\n characters:\\n\\n >>> \\'read this short text\\'.translate(None, \\'aeiou\\')\\n \\'rd ths shrt txt\\'\\n\\n New in version 2.6: Support for a "None" *table* argument.\\n\\n For Unicode objects, the "translate()" method does not accept the\\n optional *deletechars* argument. Instead, it returns a copy of the\\n *s* where all characters have been mapped through the given\\n translation table which must be a mapping of Unicode ordinals to\\n Unicode ordinals, Unicode strings or "None". Unmapped characters\\n are left untouched. Characters mapped to "None" are deleted. Note,\\n a more flexible approach is to create a custom character mapping\\n codec using the "codecs" module (see "encodings.cp1251" for an\\n example).\\n\\nstr.upper()\\n\\n Return a copy of the string with all the cased characters [4]\\n converted to uppercase. Note that "str.upper().isupper()" might be\\n "False" if "s" contains uncased characters or if the Unicode\\n category of the resulting character(s) is not "Lu" (Letter,\\n uppercase), but e.g. "Lt" (Letter, titlecase).\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.zfill(width)\\n\\n Return the numeric string left filled with zeros in a string of\\n length *width*. A sign prefix is handled correctly. The original\\n string is returned if *width* is less than or equal to "len(s)".\\n\\n New in version 2.2.2.\\n\\nThe following methods are present only on unicode objects:\\n\\nunicode.isnumeric()\\n\\n Return "True" if there are only numeric characters in S, "False"\\n otherwise. Numeric characters include digit characters, and all\\n characters that have the Unicode numeric value property, e.g.\\n U+2155, VULGAR FRACTION ONE FIFTH.\\n\\nunicode.isdecimal()\\n\\n Return "True" if there are only decimal characters in S, "False"\\n otherwise. Decimal characters include digit characters, and all\\n characters that can be used to form decimal-radix numbers, e.g.\\n U+0660, ARABIC-INDIC DIGIT ZERO.\\n', namespace
76 'typesseq': u'\\nSequence Types --- "str", "unicode", "list", "tuple", "bytearray", "buffer", "xrange"\\n*************************************************************************************\\n\\nThere are seven sequence types: strings, Unicode strings, lists,\\ntuples, bytearrays, buffers, and xrange objects.\\n\\nFor other containers see the built in "dict" and "set" classes, and\\nthe "collections" module.\\n\\nString literals are written in single or double quotes: "\\'xyzzy\\'",\\n""frobozz"". See String literals for more about string literals.\\nUnicode strings are much like strings, but are specified in the syntax\\nusing a preceding "\\'u\\'" character: "u\\'abc\\'", "u"def"". In addition to\\nthe functionality described here, there are also string-specific\\nmethods described in the String Methods section. Lists are constructed\\nwith square brackets, separating items with commas: "[a, b, c]".\\nTuples are constructed by the comma operator (not within square\\nbrackets), with or without enclosing parentheses, but an empty tuple\\nmust have the enclosing parentheses, such as "a, b, c" or "()". A\\nsingle item tuple must have a trailing comma, such as "(d,)".\\n\\nBytearray objects are created with the built-in function\\n"bytearray()".\\n\\nBuffer objects are not directly supported by Python syntax, but can be\\ncreated by calling the built-in function "buffer()". They don\\'t\\nsupport concatenation or repetition.\\n\\nObjects of type xrange are similar to buffers in that there is no\\nspecific syntax to create them, but they are created using the\\n"xrange()" function. They don\\'t support slicing, concatenation or\\nrepetition, and using "in", "not in", "min()" or "max()" on them is\\ninefficient.\\n\\nMost sequence types support the following operations. The "in" and\\n"not in" operations have the same priorities as the comparison\\noperations. The "+" and "*" operations have the same priority as the\\ncorresponding numeric operations. [3] Additional methods are provided\\nfor Mutable Sequence Types.\\n\\nThis table lists the sequence operations sorted in ascending priority.\\nIn the table, *s* and *t* are sequences of the same type; *n*, *i* and\\n*j* are integers:\\n\\n+--------------------+----------------------------------+------------+\\n| Operation | Result | Notes |\\n+====================+==================================+============+\\n| "x in s" | "True" if an item of *s* is | (1) |\\n| | equal to *x*, else "False" | |\\n+--------------------+----------------------------------+------------+\\n| "x not in s" | "False" if an item of *s* is | (1) |\\n| | equal to *x*, else "True" | |\\n+--------------------+----------------------------------+------------+\\n| "s + t" | the concatenation of *s* and *t* | (6) |\\n+--------------------+----------------------------------+------------+\\n| "s * n, n * s" | equivalent to adding *s* to | (2) |\\n| | itself *n* times | |\\n+--------------------+----------------------------------+------------+\\n| "s[i]" | *i*th item of *s*, origin 0 | (3) |\\n+--------------------+----------------------------------+------------+\\n| "s[i:j]" | slice of *s* from *i* to *j* | (3)(4) |\\n+--------------------+----------------------------------+------------+\\n| "s[i:j:k]" | slice of *s* from *i* to *j* | (3)(5) |\\n| | with step *k* | |\\n+--------------------+----------------------------------+------------+\\n| "len(s)" | length of *s* | |\\n+--------------------+----------------------------------+------------+\\n| "min(s)" | smallest item of *s* | |\\n+--------------------+----------------------------------+------------+\\n| "max(s)" | largest item of *s* | |\\n+--------------------+----------------------------------+------------+\\n| "s.index(x)" | index of the first occurrence of | |\\n| | *x* in *s* | |\\n+--------------------+----------------------------------+------------+\\n| "s.count(x)" | total number of occurrences of | |\\n| | *x* in *s* | |\\n+--------------------+----------------------------------+------------+\\n\\nSequence types also support comparisons. In particular, tuples and\\nlists are compared lexicographically by comparing corresponding\\nelements. This means that to compare equal, every element must compare\\nequal and the two sequences must be of the same type and have the same\\nlength. (For full details see Comparisons in the language reference.)\\n\\nNotes:\\n\\n1. When *s* is a string or Unicode string object the "in" and "not\\n in" operations act like a substring test. In Python versions\\n before 2.3, *x* had to be a string of length 1. In Python 2.3 and\\n beyond, *x* may be a string of any length.\\n\\n2. Values of *n* less than "0" are treated as "0" (which yields an\\n empty sequence of the same type as *s*). Note that items in the\\n sequence *s* are not copied; they are referenced multiple times.\\n This often haunts new Python programmers; consider:\\n\\n >>> lists = [[]] * 3\\n >>> lists\\n [[], [], []]\\n >>> lists[0].append(3)\\n >>> lists\\n [[3], [3], [3]]\\n\\n What has happened is that "[[]]" is a one-element list containing\\n an empty list, so all three elements of "[[]] * 3" are references\\n to this single empty list. Modifying any of the elements of\\n "lists" modifies this single list. You can create a list of\\n different lists this way:\\n\\n >>> lists = [[] for i in range(3)]\\n >>> lists[0].append(3)\\n >>> lists[1].append(5)\\n >>> lists[2].append(7)\\n >>> lists\\n [[3], [5], [7]]\\n\\n Further explanation is available in the FAQ entry How do I create a\\n multidimensional list?.\\n\\n3. If *i* or *j* is negative, the index is relative to the end of\\n the string: "len(s) + i" or "len(s) + j" is substituted. But note\\n that "-0" is still "0".\\n\\n4. The slice of *s* from *i* to *j* is defined as the sequence of\\n items with index *k* such that "i <= k < j". If *i* or *j* is\\n greater than "len(s)", use "len(s)". If *i* is omitted or "None",\\n use "0". If *j* is omitted or "None", use "len(s)". If *i* is\\n greater than or equal to *j*, the slice is empty.\\n\\n5. The slice of *s* from *i* to *j* with step *k* is defined as the\\n sequence of items with index "x = i + n*k" such that "0 <= n <\\n (j-i)/k". In other words, the indices are "i", "i+k", "i+2*k",\\n "i+3*k" and so on, stopping when *j* is reached (but never\\n including *j*). If *i* or *j* is greater than "len(s)", use\\n "len(s)". If *i* or *j* are omitted or "None", they become "end"\\n values (which end depends on the sign of *k*). Note, *k* cannot be\\n zero. If *k* is "None", it is treated like "1".\\n\\n6. **CPython implementation detail:** If *s* and *t* are both\\n strings, some Python implementations such as CPython can usually\\n perform an in-place optimization for assignments of the form "s = s\\n + t" or "s += t". When applicable, this optimization makes\\n quadratic run-time much less likely. This optimization is both\\n version and implementation dependent. For performance sensitive\\n code, it is preferable to use the "str.join()" method which assures\\n consistent linear concatenation performance across versions and\\n implementations.\\n\\n Changed in version 2.4: Formerly, string concatenation never\\n occurred in-place.\\n\\n\\nString Methods\\n==============\\n\\nBelow are listed the string methods which both 8-bit strings and\\nUnicode objects support. Some of them are also available on\\n"bytearray" objects.\\n\\nIn addition, Python\\'s strings support the sequence type methods\\ndescribed in the Sequence Types --- str, unicode, list, tuple,\\nbytearray, buffer, xrange section. To output formatted strings use\\ntemplate strings or the "%" operator described in the String\\nFormatting Operations section. Also, see the "re" module for string\\nfunctions based on regular expressions.\\n\\nstr.capitalize()\\n\\n Return a copy of the string with its first character capitalized\\n and the rest lowercased.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.center(width[, fillchar])\\n\\n Return centered in a string of length *width*. Padding is done\\n using the specified *fillchar* (default is a space).\\n\\n Changed in version 2.4: Support for the *fillchar* argument.\\n\\nstr.count(sub[, start[, end]])\\n\\n Return the number of non-overlapping occurrences of substring *sub*\\n in the range [*start*, *end*]. Optional arguments *start* and\\n *end* are interpreted as in slice notation.\\n\\nstr.decode([encoding[, errors]])\\n\\n Decodes the string using the codec registered for *encoding*.\\n *encoding* defaults to the default string encoding. *errors* may\\n be given to set a different error handling scheme. The default is\\n "\\'strict\\'", meaning that encoding errors raise "UnicodeError".\\n Other possible values are "\\'ignore\\'", "\\'replace\\'" and any other\\n name registered via "codecs.register_error()", see section Codec\\n Base Classes.\\n\\n New in version 2.2.\\n\\n Changed in version 2.3: Support for other error handling schemes\\n added.\\n\\n Changed in version 2.7: Support for keyword arguments added.\\n\\nstr.encode([encoding[, errors]])\\n\\n Return an encoded version of the string. Default encoding is the\\n current default string encoding. *errors* may be given to set a\\n different error handling scheme. The default for *errors* is\\n "\\'strict\\'", meaning that encoding errors raise a "UnicodeError".\\n Other possible values are "\\'ignore\\'", "\\'replace\\'",\\n "\\'xmlcharrefreplace\\'", "\\'backslashreplace\\'" and any other name\\n registered via "codecs.register_error()", see section Codec Base\\n Classes. For a list of possible encodings, see section Standard\\n Encodings.\\n\\n New in version 2.0.\\n\\n Changed in version 2.3: Support for "\\'xmlcharrefreplace\\'" and\\n "\\'backslashreplace\\'" and other error handling schemes added.\\n\\n Changed in version 2.7: Support for keyword arguments added.\\n\\nstr.endswith(suffix[, start[, end]])\\n\\n Return "True" if the string ends with the specified *suffix*,\\n otherwise return "False". *suffix* can also be a tuple of suffixes\\n to look for. With optional *start*, test beginning at that\\n position. With optional *end*, stop comparing at that position.\\n\\n Changed in version 2.5: Accept tuples as *suffix*.\\n\\nstr.expandtabs([tabsize])\\n\\n Return a copy of the string where all tab characters are replaced\\n by one or more spaces, depending on the current column and the\\n given tab size. Tab positions occur every *tabsize* characters\\n (default is 8, giving tab positions at columns 0, 8, 16 and so on).\\n To expand the string, the current column is set to zero and the\\n string is examined character by character. If the character is a\\n tab ("\\\\t"), one or more space characters are inserted in the result\\n until the current column is equal to the next tab position. (The\\n tab character itself is not copied.) If the character is a newline\\n ("\\\\n") or return ("\\\\r"), it is copied and the current column is\\n reset to zero. Any other character is copied unchanged and the\\n current column is incremented by one regardless of how the\\n character is represented when printed.\\n\\n >>> \\'01\\\\t012\\\\t0123\\\\t01234\\'.expandtabs()\\n \\'01 012 0123 01234\\'\\n >>> \\'01\\\\t012\\\\t0123\\\\t01234\\'.expandtabs(4)\\n \\'01 012 0123 01234\\'\\n\\nstr.find(sub[, start[, end]])\\n\\n Return the lowest index in the string where substring *sub* is\\n found within the slice "s[start:end]". Optional arguments *start*\\n and *end* are interpreted as in slice notation. Return "-1" if\\n *sub* is not found.\\n\\n Note: The "find()" method should be used only if you need to know\\n the position of *sub*. To check if *sub* is a substring or not,\\n use the "in" operator:\\n\\n >>> \\'Py\\' in \\'Python\\'\\n True\\n\\nstr.format(*args, **kwargs)\\n\\n Perform a string formatting operation. The string on which this\\n method is called can contain literal text or replacement fields\\n delimited by braces "{}". Each replacement field contains either\\n the numeric index of a positional argument, or the name of a\\n keyword argument. Returns a copy of the string where each\\n replacement field is replaced with the string value of the\\n corresponding argument.\\n\\n >>> "The sum of 1 + 2 is {0}".format(1+2)\\n \\'The sum of 1 + 2 is 3\\'\\n\\n See Format String Syntax for a description of the various\\n formatting options that can be specified in format strings.\\n\\n This method of string formatting is the new standard in Python 3,\\n and should be preferred to the "%" formatting described in String\\n Formatting Operations in new code.\\n\\n New in version 2.6.\\n\\nstr.index(sub[, start[, end]])\\n\\n Like "find()", but raise "ValueError" when the substring is not\\n found.\\n\\nstr.isalnum()\\n\\n Return true if all characters in the string are alphanumeric and\\n there is at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isalpha()\\n\\n Return true if all characters in the string are alphabetic and\\n there is at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isdigit()\\n\\n Return true if all characters in the string are digits and there is\\n at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.islower()\\n\\n Return true if all cased characters [4] in the string are lowercase\\n and there is at least one cased character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isspace()\\n\\n Return true if there are only whitespace characters in the string\\n and there is at least one character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.istitle()\\n\\n Return true if the string is a titlecased string and there is at\\n least one character, for example uppercase characters may only\\n follow uncased characters and lowercase characters only cased ones.\\n Return false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.isupper()\\n\\n Return true if all cased characters [4] in the string are uppercase\\n and there is at least one cased character, false otherwise.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.join(iterable)\\n\\n Return a string which is the concatenation of the strings in the\\n *iterable* *iterable*. The separator between elements is the\\n string providing this method.\\n\\nstr.ljust(width[, fillchar])\\n\\n Return the string left justified in a string of length *width*.\\n Padding is done using the specified *fillchar* (default is a\\n space). The original string is returned if *width* is less than or\\n equal to "len(s)".\\n\\n Changed in version 2.4: Support for the *fillchar* argument.\\n\\nstr.lower()\\n\\n Return a copy of the string with all the cased characters [4]\\n converted to lowercase.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.lstrip([chars])\\n\\n Return a copy of the string with leading characters removed. The\\n *chars* argument is a string specifying the set of characters to be\\n removed. If omitted or "None", the *chars* argument defaults to\\n removing whitespace. The *chars* argument is not a prefix; rather,\\n all combinations of its values are stripped:\\n\\n >>> \\' spacious \\'.lstrip()\\n \\'spacious \\'\\n >>> \\'www.example.com\\'.lstrip(\\'cmowz.\\')\\n \\'example.com\\'\\n\\n Changed in version 2.2.2: Support for the *chars* argument.\\n\\nstr.partition(sep)\\n\\n Split the string at the first occurrence of *sep*, and return a\\n 3-tuple containing the part before the separator, the separator\\n itself, and the part after the separator. If the separator is not\\n found, return a 3-tuple containing the string itself, followed by\\n two empty strings.\\n\\n New in version 2.5.\\n\\nstr.replace(old, new[, count])\\n\\n Return a copy of the string with all occurrences of substring *old*\\n replaced by *new*. If the optional argument *count* is given, only\\n the first *count* occurrences are replaced.\\n\\nstr.rfind(sub[, start[, end]])\\n\\n Return the highest index in the string where substring *sub* is\\n found, such that *sub* is contained within "s[start:end]".\\n Optional arguments *start* and *end* are interpreted as in slice\\n notation. Return "-1" on failure.\\n\\nstr.rindex(sub[, start[, end]])\\n\\n Like "rfind()" but raises "ValueError" when the substring *sub* is\\n not found.\\n\\nstr.rjust(width[, fillchar])\\n\\n Return the string right justified in a string of length *width*.\\n Padding is done using the specified *fillchar* (default is a\\n space). The original string is returned if *width* is less than or\\n equal to "len(s)".\\n\\n Changed in version 2.4: Support for the *fillchar* argument.\\n\\nstr.rpartition(sep)\\n\\n Split the string at the last occurrence of *sep*, and return a\\n 3-tuple containing the part before the separator, the separator\\n itself, and the part after the separator. If the separator is not\\n found, return a 3-tuple containing two empty strings, followed by\\n the string itself.\\n\\n New in version 2.5.\\n\\nstr.rsplit([sep[, maxsplit]])\\n\\n Return a list of the words in the string, using *sep* as the\\n delimiter string. If *maxsplit* is given, at most *maxsplit* splits\\n are done, the *rightmost* ones. If *sep* is not specified or\\n "None", any whitespace string is a separator. Except for splitting\\n from the right, "rsplit()" behaves like "split()" which is\\n described in detail below.\\n\\n New in version 2.4.\\n\\nstr.rstrip([chars])\\n\\n Return a copy of the string with trailing characters removed. The\\n *chars* argument is a string specifying the set of characters to be\\n removed. If omitted or "None", the *chars* argument defaults to\\n removing whitespace. The *chars* argument is not a suffix; rather,\\n all combinations of its values are stripped:\\n\\n >>> \\' spacious \\'.rstrip()\\n \\' spacious\\'\\n >>> \\'mississippi\\'.rstrip(\\'ipz\\')\\n \\'mississ\\'\\n\\n Changed in version 2.2.2: Support for the *chars* argument.\\n\\nstr.split([sep[, maxsplit]])\\n\\n Return a list of the words in the string, using *sep* as the\\n delimiter string. If *maxsplit* is given, at most *maxsplit*\\n splits are done (thus, the list will have at most "maxsplit+1"\\n elements). If *maxsplit* is not specified or "-1", then there is\\n no limit on the number of splits (all possible splits are made).\\n\\n If *sep* is given, consecutive delimiters are not grouped together\\n and are deemed to delimit empty strings (for example,\\n "\\'1,,2\\'.split(\\',\\')" returns "[\\'1\\', \\'\\', \\'2\\']"). The *sep* argument\\n may consist of multiple characters (for example,\\n "\\'1<>2<>3\\'.split(\\'<>\\')" returns "[\\'1\\', \\'2\\', \\'3\\']"). Splitting an\\n empty string with a specified separator returns "[\\'\\']".\\n\\n If *sep* is not specified or is "None", a different splitting\\n algorithm is applied: runs of consecutive whitespace are regarded\\n as a single separator, and the result will contain no empty strings\\n at the start or end if the string has leading or trailing\\n whitespace. Consequently, splitting an empty string or a string\\n consisting of just whitespace with a "None" separator returns "[]".\\n\\n For example, "\\' 1 2 3 \\'.split()" returns "[\\'1\\', \\'2\\', \\'3\\']", and\\n "\\' 1 2 3 \\'.split(None, 1)" returns "[\\'1\\', \\'2 3 \\']".\\n\\nstr.splitlines([keepends])\\n\\n Return a list of the lines in the string, breaking at line\\n boundaries. This method uses the *universal newlines* approach to\\n splitting lines. Line breaks are not included in the resulting list\\n unless *keepends* is given and true.\\n\\n Python recognizes ""\\\\r"", ""\\\\n"", and ""\\\\r\\\\n"" as line boundaries\\n for 8-bit strings.\\n\\n For example:\\n\\n >>> \\'ab c\\\\n\\\\nde fg\\\\rkl\\\\r\\\\n\\'.splitlines()\\n [\\'ab c\\', \\'\\', \\'de fg\\', \\'kl\\']\\n >>> \\'ab c\\\\n\\\\nde fg\\\\rkl\\\\r\\\\n\\'.splitlines(True)\\n [\\'ab c\\\\n\\', \\'\\\\n\\', \\'de fg\\\\r\\', \\'kl\\\\r\\\\n\\']\\n\\n Unlike "split()" when a delimiter string *sep* is given, this\\n method returns an empty list for the empty string, and a terminal\\n line break does not result in an extra line:\\n\\n >>> "".splitlines()\\n []\\n >>> "One line\\\\n".splitlines()\\n [\\'One line\\']\\n\\n For comparison, "split(\\'\\\\n\\')" gives:\\n\\n >>> \\'\\'.split(\\'\\\\n\\')\\n [\\'\\']\\n >>> \\'Two lines\\\\n\\'.split(\\'\\\\n\\')\\n [\\'Two lines\\', \\'\\']\\n\\nunicode.splitlines([keepends])\\n\\n Return a list of the lines in the string, like "str.splitlines()".\\n However, the Unicode method splits on the following line\\n boundaries, which are a superset of the *universal newlines*\\n recognized for 8-bit strings.\\n\\n +-------------------------+-------------------------------+\\n | Representation | Description |\\n +=========================+===============================+\\n | "\\\\n" | Line Feed |\\n +-------------------------+-------------------------------+\\n | "\\\\r" | Carriage Return |\\n +-------------------------+-------------------------------+\\n | "\\\\r\\\\n" | Carriage Return + Line Feed |\\n +-------------------------+-------------------------------+\\n | "\\\\v" or "\\\\x0b" | Line Tabulation |\\n +-------------------------+-------------------------------+\\n | "\\\\f" or "\\\\x0c" | Form Feed |\\n +-------------------------+-------------------------------+\\n | "\\\\x1c" | File Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\x1d" | Group Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\x1e" | Record Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\x85" | Next Line (C1 Control Code) |\\n +-------------------------+-------------------------------+\\n | "\\\\u2028" | Line Separator |\\n +-------------------------+-------------------------------+\\n | "\\\\u2029" | Paragraph Separator |\\n +-------------------------+-------------------------------+\\n\\n Changed in version 2.7: "\\\\v" and "\\\\f" added to list of line\\n boundaries.\\n\\nstr.startswith(prefix[, start[, end]])\\n\\n Return "True" if string starts with the *prefix*, otherwise return\\n "False". *prefix* can also be a tuple of prefixes to look for.\\n With optional *start*, test string beginning at that position.\\n With optional *end*, stop comparing string at that position.\\n\\n Changed in version 2.5: Accept tuples as *prefix*.\\n\\nstr.strip([chars])\\n\\n Return a copy of the string with the leading and trailing\\n characters removed. The *chars* argument is a string specifying the\\n set of characters to be removed. If omitted or "None", the *chars*\\n argument defaults to removing whitespace. The *chars* argument is\\n not a prefix or suffix; rather, all combinations of its values are\\n stripped:\\n\\n >>> \\' spacious \\'.strip()\\n \\'spacious\\'\\n >>> \\'www.example.com\\'.strip(\\'cmowz.\\')\\n \\'example\\'\\n\\n Changed in version 2.2.2: Support for the *chars* argument.\\n\\nstr.swapcase()\\n\\n Return a copy of the string with uppercase characters converted to\\n lowercase and vice versa.\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.title()\\n\\n Return a titlecased version of the string where words start with an\\n uppercase character and the remaining characters are lowercase.\\n\\n The algorithm uses a simple language-independent definition of a\\n word as groups of consecutive letters. The definition works in\\n many contexts but it means that apostrophes in contractions and\\n possessives form word boundaries, which may not be the desired\\n result:\\n\\n >>> "they\\'re bill\\'s friends from the UK".title()\\n "They\\'Re Bill\\'S Friends From The Uk"\\n\\n A workaround for apostrophes can be constructed using regular\\n expressions:\\n\\n >>> import re\\n >>> def titlecase(s):\\n ... return re.sub(r"[A-Za-z]+(\\'[A-Za-z]+)?",\\n ... lambda mo: mo.group(0)[0].upper() +\\n ... mo.group(0)[1:].lower(),\\n ... s)\\n ...\\n >>> titlecase("they\\'re bill\\'s friends.")\\n "They\\'re Bill\\'s Friends."\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.translate(table[, deletechars])\\n\\n Return a copy of the string where all characters occurring in the\\n optional argument *deletechars* are removed, and the remaining\\n characters have been mapped through the given translation table,\\n which must be a string of length 256.\\n\\n You can use the "maketrans()" helper function in the "string"\\n module to create a translation table. For string objects, set the\\n *table* argument to "None" for translations that only delete\\n characters:\\n\\n >>> \\'read this short text\\'.translate(None, \\'aeiou\\')\\n \\'rd ths shrt txt\\'\\n\\n New in version 2.6: Support for a "None" *table* argument.\\n\\n For Unicode objects, the "translate()" method does not accept the\\n optional *deletechars* argument. Instead, it returns a copy of the\\n *s* where all characters have been mapped through the given\\n translation table which must be a mapping of Unicode ordinals to\\n Unicode ordinals, Unicode strings or "None". Unmapped characters\\n are left untouched. Characters mapped to "None" are deleted. Note,\\n a more flexible approach is to create a custom character mapping\\n codec using the "codecs" module (see "encodings.cp1251" for an\\n example).\\n\\nstr.upper()\\n\\n Return a copy of the string with all the cased characters [4]\\n converted to uppercase. Note that "str.upper().isupper()" might be\\n "False" if "s" contains uncased characters or if the Unicode\\n category of the resulting character(s) is not "Lu" (Letter,\\n uppercase), but e.g. "Lt" (Letter, titlecase).\\n\\n For 8-bit strings, this method is locale-dependent.\\n\\nstr.zfill(width)\\n\\n Return the numeric string left filled with zeros in a string of\\n length *width*. A sign prefix is handled correctly. The original\\n string is returned if *width* is less than or equal to "len(s)".\\n\\n New in version 2.2.2.\\n\\nThe following methods are present only on unicode objects:\\n\\nunicode.isnumeric()\\n\\n Return "True" if there are only numeric characters in S, "False"\\n otherwise. Numeric characters include digit characters, and all\\n characters that have the Unicode numeric value property, e.g.\\n U+2155, VULGAR FRACTION ONE FIFTH.\\n\\nunicode.isdecimal()\\n\\n Return "True" if there are only decimal characters in S, "False"\\n otherwise. Decimal characters include digit characters, and all\\n characters that can be used to form decimal-radix numbers, e.g.\\n U+0660, ARABIC-INDIC DIGIT ZERO.\\n\\n\\nString Formatting Operations\\n============================\\n\\nString and Unicode objects have one unique built-in operation: the "%"\\noperator (modulo). This is also known as the string *formatting* or\\n*interpolation* operator. Given "format % values" (where *format* is\\na string or Unicode object), "%" conversion specifications in *format*\\nare replaced with zero or more elements of *values*. The effect is\\nsimilar to the using "sprintf()" in the C language. If *format* is a\\nUnicode object, or if any of the objects being converted using the\\n"%s" conversion are Unicode objects, the result will also be a Unicode\\nobject.\\n\\nIf *format* requires a single argument, *values* may be a single non-\\ntuple object. [5] Otherwise, *values* must be a tuple with exactly\\nthe number of items specified by the format string, or a single\\nmapping object (for example, a dictionary).\\n\\nA conversion specifier contains two or more characters and has the\\nfollowing components, which must occur in this order:\\n\\n1. The "\\'%\\'" character, which marks the start of the specifier.\\n\\n2. Mapping key (optional), consisting of a parenthesised sequence\\n of characters (for example, "(somename)").\\n\\n3. Conversion flags (optional), which affect the result of some\\n conversion types.\\n\\n4. Minimum field width (optional). If specified as an "\\'*\\'"\\n (asterisk), the actual width is read from the next element of the\\n tuple in *values*, and the object to convert comes after the\\n minimum field width and optional precision.\\n\\n5. Precision (optional), given as a "\\'.\\'" (dot) followed by the\\n precision. If specified as "\\'*\\'" (an asterisk), the actual width\\n is read from the next element of the tuple in *values*, and the\\n value to convert comes after the precision.\\n\\n6. Length modifier (optional).\\n\\n7. Conversion type.\\n\\nWhen the right argument is a dictionary (or other mapping type), then\\nthe formats in the string *must* include a parenthesised mapping key\\ninto that dictionary inserted immediately after the "\\'%\\'" character.\\nThe mapping key selects the value to be formatted from the mapping.\\nFor example:\\n\\n>>> print \\'%(language)s has %(number)03d quote types.\\' % \\\\\\n... {"language": "Python", "number": 2}\\nPython has 002 quote types.\\n\\nIn this case no "*" specifiers may occur in a format (since they\\nrequire a sequential parameter list).\\n\\nThe conversion flag characters are:\\n\\n+-----------+-----------------------------------------------------------------------+\\n| Flag | Meaning |\\n+===========+=======================================================================+\\n| "\\'#\\'" | The value conversion will use the "alternate form" (where defined |\\n| | below). |\\n+-----------+-----------------------------------------------------------------------+\\n| "\\'0\\'" | The conversion will be zero padded for numeric values. |\\n+-----------+-----------------------------------------------------------------------+\\n| "\\'-\\'" | The converted value is left adjusted (overrides the "\\'0\\'" conversion |\\n| | if both are given). |\\n+-----------+-----------------------------------------------------------------------+\\n| "\\' \\'" | (a space) A blank should be left before a positive number (or empty |\\n| | string) produced by a signed conversion. |\\n+-----------+-----------------------------------------------------------------------+\\n| "\\'+\\'" | A sign character ("\\'+\\'" or "\\'-\\'") will precede the conversion |\\n| | (overrides a "space" flag). |\\n+-----------+-----------------------------------------------------------------------+\\n\\nA length modifier ("h", "l", or "L") may be present, but is ignored as\\nit is not necessary for Python -- so e.g. "%ld" is identical to "%d".\\n\\nThe conversion types are:\\n\\n+--------------+-------------------------------------------------------+---------+\\n| Conversion | Meaning | Notes |\\n+==============+=======================================================+=========+\\n| "\\'d\\'" | Signed integer decimal. | |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'i\\'" | Signed integer decimal. | |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'o\\'" | Signed octal value. | (1) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'u\\'" | Obsolete type -- it is identical to "\\'d\\'". | (7) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'x\\'" | Signed hexadecimal (lowercase). | (2) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'X\\'" | Signed hexadecimal (uppercase). | (2) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'e\\'" | Floating point exponential format (lowercase). | (3) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'E\\'" | Floating point exponential format (uppercase). | (3) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'f\\'" | Floating point decimal format. | (3) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'F\\'" | Floating point decimal format. | (3) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'g\\'" | Floating point format. Uses lowercase exponential | (4) |\\n| | format if exponent is less than -4 or not less than | |\\n| | precision, decimal format otherwise. | |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'G\\'" | Floating point format. Uses uppercase exponential | (4) |\\n| | format if exponent is less than -4 or not less than | |\\n| | precision, decimal format otherwise. | |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'c\\'" | Single character (accepts integer or single character | |\\n| | string). | |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'r\\'" | String (converts any Python object using repr()). | (5) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'s\\'" | String (converts any Python object using "str()"). | (6) |\\n+--------------+-------------------------------------------------------+---------+\\n| "\\'%\\'" | No argument is converted, results in a "\\'%\\'" | |\\n| | character in the result. | |\\n+--------------+-------------------------------------------------------+---------+\\n\\nNotes:\\n\\n1. The alternate form causes a leading zero ("\\'0\\'") to be inserted\\n between left-hand padding and the formatting of the number if the\\n leading character of the result is not already a zero.\\n\\n2. The alternate form causes a leading "\\'0x\\'" or "\\'0X\\'" (depending\\n on whether the "\\'x\\'" or "\\'X\\'" format was used) to be inserted\\n between left-hand padding and the formatting of the number if the\\n leading character of the result is not already a zero.\\n\\n3. The alternate form causes the result to always contain a decimal\\n point, even if no digits follow it.\\n\\n The precision determines the number of digits after the decimal\\n point and defaults to 6.\\n\\n4. The alternate form causes the result to always contain a decimal\\n point, and trailing zeroes are not removed as they would otherwise\\n be.\\n\\n The precision determines the number of significant digits before\\n and after the decimal point and defaults to 6.\\n\\n5. The "%r" conversion was added in Python 2.0.\\n\\n The precision determines the maximal number of characters used.\\n\\n6. If the object or format provided is a "unicode" string, the\\n resulting string will also be "unicode".\\n\\n The precision determines the maximal number of characters used.\\n\\n7. See **PEP 237**.\\n\\nSince Python strings have an explicit length, "%s" conversions do not\\nassume that "\\'\\\\0\\'" is the end of the string.\\n\\nChanged in version 2.7: "%f" conversions for numbers whose absolute\\nvalue is over 1e50 are no longer replaced by "%g" conversions.\\n\\nAdditional string operations are defined in standard modules "string"\\nand "re".\\n\\n\\nXRange Type\\n===========\\n\\nThe "xrange" type is an immutable sequence which is commonly used for\\nlooping. The advantage of the "xrange" type is that an "xrange"\\nobject will always take the same amount of memory, no matter the size\\nof the range it represents. There are no consistent performance\\nadvantages.\\n\\nXRange objects have very little behavior: they only support indexing,\\niteration, and the "len()" function.\\n\\n\\nMutable Sequence Types\\n======================\\n\\nList and "bytearray" objects support additional operations that allow\\nin-place modification of the object. Other mutable sequence types\\n(when added to the language) should also support these operations.\\nStrings and tuples are immutable sequence types: such objects cannot\\nbe modified once created. The following operations are defined on\\nmutable sequence types (where *x* is an arbitrary object):\\n\\n+--------------------------------+----------------------------------+-----------------------+\\n| Operation | Result | Notes |\\n+================================+==================================+=======================+\\n| "s[i] = x" | item *i* of *s* is replaced by | |\\n| | *x* | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s[i:j] = t" | slice of *s* from *i* to *j* is | |\\n| | replaced by the contents of the | |\\n| | iterable *t* | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "del s[i:j]" | same as "s[i:j] = []" | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s[i:j:k] = t" | the elements of "s[i:j:k]" are | (1) |\\n| | replaced by those of *t* | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "del s[i:j:k]" | removes the elements of | |\\n| | "s[i:j:k]" from the list | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.append(x)" | same as "s[len(s):len(s)] = [x]" | (2) |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.extend(t)" or "s += t" | for the most part the same as | (3) |\\n| | "s[len(s):len(s)] = t" | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s *= n" | updates *s* with its contents | (11) |\\n| | repeated *n* times | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.count(x)" | return number of *i*\\'s for which | |\\n| | "s[i] == x" | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.index(x[, i[, j]])" | return smallest *k* such that | (4) |\\n| | "s[k] == x" and "i <= k < j" | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.insert(i, x)" | same as "s[i:i] = [x]" | (5) |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.pop([i])" | same as "x = s[i]; del s[i]; | (6) |\\n| | return x" | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.remove(x)" | same as "del s[s.index(x)]" | (4) |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.reverse()" | reverses the items of *s* in | (7) |\\n| | place | |\\n+--------------------------------+----------------------------------+-----------------------+\\n| "s.sort([cmp[, key[, | sort the items of *s* in place | (7)(8)(9)(10) |\\n| reverse]]])" | | |\\n+--------------------------------+----------------------------------+-----------------------+\\n\\nNotes:\\n\\n1. *t* must have the same length as the slice it is replacing.\\n\\n2. The C implementation of Python has historically accepted\\n multiple parameters and implicitly joined them into a tuple; this\\n no longer works in Python 2.0. Use of this misfeature has been\\n deprecated since Python 1.4.\\n\\n3. *t* can be any iterable object.\\n\\n4. Raises "ValueError" when *x* is not found in *s*. When a\\n negative index is passed as the second or third parameter to the\\n "index()" method, the list length is added, as for slice indices.\\n If it is still negative, it is truncated to zero, as for slice\\n indices.\\n\\n Changed in version 2.3: Previously, "index()" didn\\'t have arguments\\n for specifying start and stop positions.\\n\\n5. When a negative index is passed as the first parameter to the\\n "insert()" method, the list length is added, as for slice indices.\\n If it is still negative, it is truncated to zero, as for slice\\n indices.\\n\\n Changed in version 2.3: Previously, all negative indices were\\n truncated to zero.\\n\\n6. The "pop()" method\\'s optional argument *i* defaults to "-1", so\\n that by default the last item is removed and returned.\\n\\n7. The "sort()" and "reverse()" methods modify the list in place\\n for economy of space when sorting or reversing a large list. To\\n remind you that they operate by side effect, they don\\'t return the\\n sorted or reversed list.\\n\\n8. The "sort()" method takes optional arguments for controlling the\\n comparisons.\\n\\n *cmp* specifies a custom comparison function of two arguments (list\\n items) which should return a negative, zero or positive number\\n depending on whether the first argument is considered smaller than,\\n equal to, or larger than the second argument: "cmp=lambda x,y:\\n cmp(x.lower(), y.lower())". The default value is "None".\\n\\n *key* specifies a function of one argument that is used to extract\\n a comparison key from each list element: "key=str.lower". The\\n default value is "None".\\n\\n *reverse* is a boolean value. If set to "True", then the list\\n elements are sorted as if each comparison were reversed.\\n\\n In general, the *key* and *reverse* conversion processes are much\\n faster than specifying an equivalent *cmp* function. This is\\n because *cmp* is called multiple times for each list element while\\n *key* and *reverse* touch each element only once. Use\\n "functools.cmp_to_key()" to convert an old-style *cmp* function to\\n a *key* function.\\n\\n Changed in version 2.3: Support for "None" as an equivalent to\\n omitting *cmp* was added.\\n\\n Changed in version 2.4: Support for *key* and *reverse* was added.\\n\\n9. Starting with Python 2.3, the "sort()" method is guaranteed to\\n be stable. A sort is stable if it guarantees not to change the\\n relative order of elements that compare equal --- this is helpful\\n for sorting in multiple passes (for example, sort by department,\\n then by salary grade).\\n\\n10. **CPython implementation detail:** While a list is being\\n sorted, the effect of attempting to mutate, or even inspect, the\\n list is undefined. The C implementation of Python 2.3 and newer\\n makes the list appear empty for the duration, and raises\\n "ValueError" if it can detect that the list has been mutated\\n during a sort.\\n\\n11. The value *n* is an integer, or an object implementing\\n "__index__()". Zero and negative values of *n* clear the\\n sequence. Items in the sequence are not copied; they are\\n referenced multiple times, as explained for "s * n" under Sequence\\n Types --- str, unicode, list, tuple, bytearray, buffer, xrange.\\n', namespace
[all...]

Completed in 1222 milliseconds