I. Basic data types
Integer: int
String: str (Note: \t is equal to a tab key)
Boolean: bool
List: list
List with []
Metazoan: tuple
Genjo used ()
Dictionary: dict
Note: All data types exist in the class columns that you want to correspond to.
II. String all data types:
Basic Operations:
Index, Slice, Append, Delete, Length, Slice, Loop, Contains
class str(object): """ str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to (). errors defaults to 'strict'. """ def capitalize(self): # real signature unknown; restored from __doc__ """ () -> str Return a capitalized version of S, . make the first character have upper case and the rest lower case.(Returns a capitalized version of the age,i.e. the first character,capital letters,lowercase the rest。) """ return "" def casefold(self): # real signature unknown; restored from __doc__ """ () -> str Return a version of S suitable for caseless comparisons.(Returns a version of theSsuitabilitycaselesscomparisons。) """ return "" def center(self, width, fillchar=None): # real signature unknown; restored from __doc__ """ (width[, fillchar]) -> str Return S centered in a string of length width. Padding is done using the specified fill character (default is a space)(Returns the width of the length of a string in the chronology.。Fill uses the specified fill character(The default is a space)) """ return "" def count(self, sub, start=None, end=None): # real signature unknown; restored from __doc__ """ (sub[, start[, end]]) -> int Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation. (Returned number of overlapping occurrences of substring substring(commencement:close)。可选参数的commencementcap (a poem)close解释为片符号。) """ return 0 def encode(self, encoding='utf-8', errors='strict'): # real signature unknown; restored from __doc__ """ (encoding='utf-8', errors='strict') -> bytes Encode S using the codec registered for encoding. Default encoding is 'utf-8'. errors may be given to set a different error handling scheme. Default is 'strict' meaning that encoding errors raise a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and 'xmlcharrefreplace' as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors. """ return b"" def expandtabs(self, tabsize=8): # real signature unknown; restored from __doc__ """ (tabsize=8) -> str Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed. (Returning the age of a copy,Expanded space for all tabs。in the event thattabsizefault,A label size8characters。) """ return "" def find(self, sub, start=None, end=None): # real signature unknown; restored from __doc__ """ (sub[, start[, end]]) -> int Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure. (The era with the lowest payoff index finds the substring sub,Such a sub is contained in theS[commencement:close]。可选参数中解释为commencementcap (a poem)close符号。) """ return 0 def format(self, *args, **kwargs): # known special case of """ (*args, **kwargs) -> str Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces ('{' and '}'). (Returns a formatted chronology,Utilizing the substitution of parameters andkwargs。Replace bracketed(“{”cap (a poem)“}”)。) """ pass def format_map(self, mapping): # real signature unknown; restored from __doc__ """ S.format_map(mapping) -> str Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces ('{' and '}'). (Returns a formatted chronology,Replacement using mapping。Replace bracketed(“{”cap (a poem)“}”)。) """ return "" def index(self, sub, start=None, end=None): # real signature unknown; restored from __doc__ """ (sub[, start[, end]]) -> int Like () but raise ValueError when the substring is not found. (look as if(),But when no substring is found, raise theValueError) """ return 0 def isalnum(self): # real signature unknown; restored from __doc__ """ () -> bool Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise. (in the event that在年代所有的人物都是字母数字come (or go) backTruecap (a poem)至少有一个角色年代,callable capital。) """ return False def isalpha(self): # real signature unknown; restored from __doc__ """ () -> bool Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise. (in the event that在年代所有的人物都是字母come (or go) backTruecap (a poem)至少有一个角色年代,callable capital。) """ return False def isdigit(self): # real signature unknown; restored from __doc__ """ () -> bool Return True if all characters in S are digits and there is at least one character in S, False otherwise. (come (or go) backTrue,in the event that在年代所有的人物都是数字cap (a poem)至少有一个角色年代,callable capital。) """ return False def islower(self): # real signature unknown; restored from __doc__ """ () -> bool Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise. (come (or go) backTrue,in the event that所有Slowercase (letters),The character of the lower casing has at least one lower casing in the chronology,callable capital。) """ return False def isnumeric(self): # real signature unknown; restored from __doc__ """ () -> bool Return True if there are only numeric characters in S, False otherwise. (come (or go) backTrue,in the event that只有数字字符,Otherwise error。) """ return False def isprintable(self): # real signature unknown; restored from __doc__ """ () -> bool Return True if all characters in S are considered printable in repr() or S is empty, False otherwise. (in the event that在年代所有的人物都是考虑come (or go) backTrue,Printable onrepr()Or the years are empty,callable capital。) """ return False def isspace(self): # real signature unknown; restored from __doc__ """ () -> bool Return True if all characters in S are whitespace and there is at least one character in S, False otherwise. (come (or go) backTrue,in the event that在年代所有的人物都是空白cap (a poem)至少有一个角色年代,callable capital。) """ return False def istitle(self): # real signature unknown; restored from __doc__ """ () -> bool Return True if S is a titlecased string and there is at least one character in S, . upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise. (come (or go) backTrue,in the event thatS titlecased字符串cap (a poem)至少有一个个性age,i.e.,might justtitlecase字符遵循外露的字符cap (a poem)小写字符只下套管。否则come (or go) back假。) """ return False def isupper(self): # real signature unknown; restored from __doc__ """ () -> bool Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise. (come (or go) backTrue,in the event that所有SIt's capitalized.,The character of the lower casing has at least one lower casing in the chronology,callable capital。) """ return False def join(self, iterable): # real signature unknown; restored from __doc__ """ (iterable) -> str Return a string which is the concatenation of the strings in the iterable. The separator between elements is S. (come (or go) back一characters串的连接字符串iterable。The separator between elements isS。) """ return "" def ljust(self, width, fillchar=None): # real signature unknown; restored from __doc__ """ (width[, fillchar]) -> str Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space). (come (or go) back年代左对齐的UnicodeString length width。Fill uses the specified fill character(The default value is a space)。) """ return "" def lower(self): # real signature unknown; restored from __doc__ """ () -> str Return a copy of the string S converted to lowercase. (come (or go) back的字符串转换为小写。) """ return "" def lstrip(self, chars=None): # real signature unknown; restored from __doc__ """ ([chars]) -> str Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. (come (or go) back字符串的副本删除前导空白。in the event that字符而fault没有,Delete Character Character Replacement。) """ return "" def partition(self, sep): # real signature unknown; restored from __doc__ """ (sep) -> (head, sep, tail) Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings. (Search for separatorssepage,并come (or go) back之前的部分一样,separator itself,latter part。in the event that分隔符发现,还cap (a poem)两个空字符串。) """ pass def replace(self, old, new, count=None): # real signature unknown; restored from __doc__ """ (old, new[, count]) -> str Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced. (come (or go) back一个年代出现的所有子字符串的副本老被新的取代。in the event that可选参数计数,Replace only the first count。) """ return "" def rfind(self, sub, start=None, end=None): # real signature unknown; restored from __doc__ """ (sub[, start[, end]]) -> int Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure. (The exponent with the highest payoff finds substrings in the epoch sub,Such a sub is contained in theS[commencement:close]。可选参数中解释为commencementcap (a poem)close符号。) """ return 0 def rindex(self, sub, start=None, end=None): # real signature unknown; restored from __doc__ """ (sub[, start[, end]]) -> int Like () but raise ValueError when the substring is not found. (look as if(),But when no substring is found, raise theValueError。) """ return 0 def rjust(self, width, fillchar=None): # real signature unknown; restored from __doc__ """ (width[, fillchar]) -> str Return S right-justified in a string of length width. Padding is done using the specified fill character (default is a space). (come (or go) back右对齐的在一characters串的长度宽度。Fill uses the specified fill character(The default value is a space)) """ return "" def rpartition(self, sep): # real signature unknown; restored from __doc__ """ (sep) -> (head, sep, tail) Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S. (Looking for separators in the ages,9mooncommencementage,并come (or go) back之前的部分一样,The separator itself,latter part。in the event that没有找到分隔符,come (or go) back两个空字符串cap (a poem)年代。) """ pass def rsplit(self, sep=None, maxsplit=-1): # real signature unknown; restored from __doc__ """ (sep=None, maxsplit=-1) -> list of strings Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator. (come (or go) back一个列表的单词,utilization9Months as delimited strings,字符串的closecap (a poem)commencement工作到前面来。in the event thatmaxsplit,at mostmaxsplitSegmentation complete。in the event that没有指定9moon,Any blank string is a separator。) """ return [] def rstrip(self, chars=None): # real signature unknown; restored from __doc__ """ ([chars]) -> str Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. (come (or go) back一characters串的副本年代尾随空格移除。in the event that字符而fault没有,Delete Character Character Replacement。) """ return "" def split(self, sep=None, maxsplit=-1): # real signature unknown; restored from __doc__ """ (sep=None, maxsplit=-1) -> list of strings Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result. (come (or go) back一个列表的单词,utilization9moon作为 String of delimiters。in the event thatmaxsplit,at mostmaxsplit Segmentation complete。in the event that没有指定9moon或没有, 空白字符串分隔符cap (a poem)空字符串 Remove from results。) """ return [] def splitlines(self, keepends=None): # real signature unknown; restored from __doc__ """ ([keepends]) -> list of strings Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.(come (or go) back一个列表的行,The line breaks the boundaries。Line breaks are not included in the results list,only in the case thatkeependscap (a poem)真正的。) """ return [] def startswith(self, prefix, start=None, end=None): # real signature unknown; restored from __doc__ """ (prefix[, start[, end]]) -> bool Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try. (come (or go) backTrue,in the event that年代始于指定的前缀,callable capital。 可选的commencement,测试年代commencement在那个位置。 带有可选close,停止comparisons年代在那个位置。 The prefix can also try a tuple of strings。) """ return False def strip(self, chars=None): # real signature unknown; restored from __doc__ """ ([chars]) -> str Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead.(come (or go) back字符串的副本与前导cap (a poem)尾随空格移除。in the event that字符而fault没有,Delete Character Character Replacement。) """ return "" def swapcase(self): # real signature unknown; restored from __doc__ """ () -> str Return a copy of S with uppercase characters converted to lowercase and vice versa.(Returning the age of a copy大写字符转换为小写反之亦然) """ return "" def title(self): # real signature unknown; restored from __doc__ """ () -> str Return a titlecased version of S, . words start with title case characters, all remaining cased characters have lower case.(come (or go) back一个titlecased版本age,即单词从标题commencement字符,Lowercase all remaining lowercase casing characters) """ return "" def translate(self, table): # real signature unknown; restored from __doc__ """ (table) -> str Return a copy of the string S in which each character has been mapped through the given translation table. The table must implement lookup/indexing via __getitem__, for instance a dictionary or list, mapping Unicode ordinals to Unicode ordinals, strings, or None. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.(come (or go) back的字符串的每characters被映射通过给定的转换表。 The table must be implemented to pass the__getitem__find/indexing,For example, a dictionary or a list,Unicodemaps sequentially toUnicodeordinal number、String or no。 in the event that此操作提出了LookupError,Characters remain unchanged) """ return "" def upper(self): # real signature unknown; restored from __doc__ """ () -> str Return a copy of S converted to uppercase.(come (or go) back一个副本年代转换为大写) """ return "" def zfill(self, width): # real signature unknown; restored from __doc__ """ (width) -> str Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.(Pad a numeric string with0The years are on the left.,Fill a field with the specified width。String ages are not truncated。) """ return "" def __add__(self, *args, **kwargs): # real signature unknown """ Return self+value. """ pass def __contains__(self, *args, **kwargs): # real signature unknown """ Return key in self. """ pass def __eq__(self, *args, **kwargs): # real signature unknown """ Return self==value. """ pass def __format__(self, format_spec): # real signature unknown; restored from __doc__ """ S.__format__(format_spec) -> str Return a formatted version of S as described by format_spec. """ return "" def __getattribute__(self, *args, **kwargs): # real signature unknown """ Return getattr(self, name). """ pass def __getitem__(self, *args, **kwargs): # real signature unknown """ Return self[key]. """ pass def __getnewargs__(self, *args, **kwargs): # real signature unknown pass def __ge__(self, *args, **kwargs): # real signature unknown """ Return self>=value. """ pass def __gt__(self, *args, **kwargs): # real signature unknown """ Return self>value. """ pass def __hash__(self, *args, **kwargs): # real signature unknown """ Return hash(self). """ pass def __init__(self, value='', encoding=None, errors='strict'): # known special case of str.__init__ """ str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to (). errors defaults to 'strict'. # (copied from class doc) """ pass def __iter__(self, *args, **kwargs): # real signature unknown """ Implement iter(self). """ pass def __len__(self, *args, **kwargs): # real signature unknown """ Return len(self). """ pass def __le__(self, *args, **kwargs): # real signature unknown """ Return self<=value. """ pass def __lt__(self, *args, **kwargs): # real signature unknown """ Return self<value. """ pass def __mod__(self, *args, **kwargs): # real signature unknown """ Return self%value. """ pass def __mul__(self, *args, **kwargs): # real signature unknown """ Return self* """ pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __ne__(self, *args, **kwargs): # real signature unknown """ Return self!=value. """ pass def __repr__(self, *args, **kwargs): # real signature unknown """ Return repr(self). """ pass def __rmod__(self, *args, **kwargs): # real signature unknown """ Return value%self. """ pass def __rmul__(self, *args, **kwargs): # real signature unknown """ Return self*value. """ pass def __sizeof__(self): # real signature unknown; restored from __doc__ """ S.__sizeof__() -> size of S in memory, in bytes """ pass def __str__(self, *args, **kwargs): # real signature unknown """ Return str(self). """ pass class super(object): """ super() -> same as super(__class__, <first argument>) super(type) -> unbound super object super(type, obj) -> bound super object; requires isinstance(obj, type) super(type, type2) -> bound super object; requires issubclass(type2, type) Typical use to call a cooperative superclass method: class C(B): def meth(self, arg): super().meth(arg) This works for class methods too: class C(B): @classmethod def cmeth(cls, arg): super().cmeth(arg) """ def __getattribute__(self, *args, **kwargs): # real signature unknown """ Return getattr(self, name). """ pass def __get__(self, *args, **kwargs): # real signature unknown """ Return an attribute of instance, which is of type owner. """ pass def __init__(self, type1=None, type2=None): # known special case of super.__init__ """ super() -> same as super(__class__, <first argument>) super(type) -> unbound super object super(type, obj) -> bound super object; requires isinstance(obj, type) super(type, type2) -> bound super object; requires issubclass(type2, type) Typical use to call a cooperative superclass method: class C(B): def meth(self, arg): super().meth(arg) This works for class methods too: class C(B): @classmethod def cmeth(cls, arg): super().cmeth(arg) # (copied from class doc) """ pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __repr__(self, *args, **kwargs): # real signature unknown """ Return repr(self). """ pass __self_class__ = property(lambda self: type(object)) """the type of the instance invoking super(); may be None :type: type """ __self__ = property(lambda self: type(object)) """the instance invoking super(); may be None :type: type """ __thisclass__ = property(lambda self: type(object)) """the class invoking super() :type: type """ class SyntaxWarning(Warning): """ Base class for warnings about dubious syntax. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass class SystemError(Exception): """ Internal error in the Python interpreter. Please report this to the Python maintainer, along with the traceback, the Python version, and the hardware/OS platform and version. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass class SystemExit(BaseException): """ Request to exit from the interpreter. """ def __init__(self, *args, **kwargs): # real signature unknown pass code = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception code""" class TabError(IndentationError): """ Improper mixture of spaces and tabs. """ def __init__(self, *args, **kwargs): # real signature unknown pass class TimeoutError(OSError): """ Timeout expired. """ def __init__(self, *args, **kwargs): # real signature unknown pass class tuple(object): """ tuple() -> empty tuple tuple(iterable) -> tuple initialized from iterable's items If the argument is a tuple, the return value is the same object. """ def count(self, value): # real signature unknown; restored from __doc__ """ (value) -> integer -- return number of occurrences of value """ return 0 def index(self, value, start=None, stop=None): # real signature unknown; restored from __doc__ """ (value, [start, [stop]]) -> integer -- return first index of value. Raises ValueError if the value is not present. """ return 0 def __add__(self, *args, **kwargs): # real signature unknown """ Return self+value. """ pass def __contains__(self, *args, **kwargs): # real signature unknown """ Return key in self. """ pass def __eq__(self, *args, **kwargs): # real signature unknown """ Return self==value. """ pass def __getattribute__(self, *args, **kwargs): # real signature unknown """ Return getattr(self, name). """ pass def __getitem__(self, *args, **kwargs): # real signature unknown """ Return self[key]. """ pass def __getnewargs__(self, *args, **kwargs): # real signature unknown pass def __ge__(self, *args, **kwargs): # real signature unknown """ Return self>=value. """ pass def __gt__(self, *args, **kwargs): # real signature unknown """ Return self>value. """ pass def __hash__(self, *args, **kwargs): # real signature unknown """ Return hash(self). """ pass def __init__(self, seq=()): # known special case of tuple.__init__ """ tuple() -> empty tuple tuple(iterable) -> tuple initialized from iterable's items If the argument is a tuple, the return value is the same object. # (copied from class doc) """ pass def __iter__(self, *args, **kwargs): # real signature unknown """ Implement iter(self). """ pass def __len__(self, *args, **kwargs): # real signature unknown """ Return len(self). """ pass def __le__(self, *args, **kwargs): # real signature unknown """ Return self<=value. """ pass def __lt__(self, *args, **kwargs): # real signature unknown """ Return self<value. """ pass def __mul__(self, *args, **kwargs): # real signature unknown """ Return self* """ pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __ne__(self, *args, **kwargs): # real signature unknown """ Return self!=value. """ pass def __repr__(self, *args, **kwargs): # real signature unknown """ Return repr(self). """ pass def __rmul__(self, *args, **kwargs): # real signature unknown """ Return self*value. """ pass class type(object): """ type(object_or_name, bases, dict) type(object) -> the object's type type(name, bases, dict) -> a new type """ def mro(self): # real signature unknown; restored from __doc__ """ mro() -> list return a type's method resolution order """ return [] def __call__(self, *args, **kwargs): # real signature unknown """ Call self as a function. """ pass def __delattr__(self, *args, **kwargs): # real signature unknown """ Implement delattr(self, name). """ pass def __dir__(self): # real signature unknown; restored from __doc__ """ __dir__() -> list specialized __dir__ implementation for types """ return [] def __getattribute__(self, *args, **kwargs): # real signature unknown """ Return getattr(self, name). """ pass def __init__(cls, what, bases=None, dict=None): # known special case of type.__init__ """ type(object_or_name, bases, dict) type(object) -> the object's type type(name, bases, dict) -> a new type # (copied from class doc) """ pass def __instancecheck__(self): # real signature unknown; restored from __doc__ """ __instancecheck__() -> bool check if an object is an instance """ return False @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __prepare__(self): # real signature unknown; restored from __doc__ """ __prepare__() -> dict used to create the namespace for the class statement """ return {} def __repr__(self, *args, **kwargs): # real signature unknown """ Return repr(self). """ pass def __setattr__(self, *args, **kwargs): # real signature unknown """ Implement setattr(self, name, value). """ pass def __sizeof__(self): # real signature unknown; restored from __doc__ """ __sizeof__() -> int return memory consumption of the type object """ return 0 def __subclasscheck__(self): # real signature unknown; restored from __doc__ """ __subclasscheck__() -> bool check if a class is a subclass """ return False def __subclasses__(self): # real signature unknown; restored from __doc__ """ __subclasses__() -> list of immediate subclasses """ return [] __abstractmethods__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default __bases__ = ( object, ) __base__ = object __basicsize__ = 864 __dictoffset__ = 264 __dict__ = None # (!) real value is '' __flags__ = -2146675712 __itemsize__ = 40 __mro__ = ( None, # (!) forward: type, real value is '' object, ) __name__ = 'type' __qualname__ = 'type' __text_signature__ = None __weakrefoffset__ = 368 class TypeError(Exception): """ Inappropriate argument type. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass class UnboundLocalError(NameError): """ Local name referenced but not bound to a value. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass class ValueError(Exception): """ Inappropriate argument value (of correct type). """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass class UnicodeError(ValueError): """ Unicode related error. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass class UnicodeDecodeError(UnicodeError): """ Unicode decoding error. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __str__(self, *args, **kwargs): # real signature unknown """ Return str(self). """ pass encoding = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception encoding""" end = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception end""" object = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception object""" reason = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception reason""" start = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception start""" class UnicodeEncodeError(UnicodeError): """ Unicode encoding error. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __str__(self, *args, **kwargs): # real signature unknown """ Return str(self). """ pass encoding = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception encoding""" end = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception end""" object = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception object""" reason = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception reason""" start = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception start""" class UnicodeTranslateError(UnicodeError): """ Unicode translation error. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __str__(self, *args, **kwargs): # real signature unknown """ Return str(self). """ pass encoding = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception encoding""" end = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception end""" object = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception object""" reason = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception reason""" start = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """exception start""" class UnicodeWarning(Warning): """ Base class for warnings about Unicode related problems, mostly related to conversion problems. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass class UserWarning(Warning): """ Base class for warnings generated by user code. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass class ZeroDivisionError(ArithmeticError): """ Second argument to a division or modulo operation was zero. """ def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass class zip(object): """ zip(iter1 [,iter2 [...]]) --> zip object Return a zip object whose .__next__() method returns a tuple where the i-th element comes from the i-th iterable argument. The .__next__() method continues until the shortest iterable in the argument sequence is exhausted and then it raises StopIteration. """ def __getattribute__(self, *args, **kwargs): # real signature unknown """ Return getattr(self, name). """ pass def __init__(self, iter1, iter2=None, *some): # real signature unknown; restored from __doc__ pass def __iter__(self, *args, **kwargs): # real signature unknown """ Implement iter(self). """ pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __next__(self, *args, **kwargs): # real signature unknown """ Implement next(self). """ pass def __reduce__(self, *args, **kwargs): # real signature unknown """ Return state information for pickling. """ pass class __loader__(object): """ Meta path import for built-in modules. All methods are either class or static methods to avoid the need to instantiate the class. """ def create_module(self, *args, **kwargs): # real signature unknown """ Create a built-in module """ pass def exec_module(self, *args, **kwargs): # real signature unknown """ Exec a built-in module """ pass def find_module(self, *args, **kwargs): # real signature unknown """ Find the built-in module. If 'path' is ever specified then the search is considered a failure. This method is deprecated. Use find_spec() instead. """ pass def find_spec(self, *args, **kwargs): # real signature unknown pass def get_code(self, *args, **kwargs): # real signature unknown """ Return None as built-in modules do not have code objects. """ pass def get_source(self, *args, **kwargs): # real signature unknown """ Return None as built-in modules do not have source code. """ pass def is_package(self, *args, **kwargs): # real signature unknown """ Return False as built-in modules are never packages. """ pass def load_module(self, *args, **kwargs): # real signature unknown """ Load the specified module into and return it. This method is deprecated. Use loader.exec_module instead. """ pass def module_repr(module): # reliably restored by inspect """ Return repr for the module. The method is deprecated. The import machinery does the job itself. """ pass def __init__(self, *args, **kwargs): # real signature unknown pass __weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """list of weak references to the object (if defined)""" __dict__ = None # (!) real value is '' # variables with complex values Ellipsis = None # (!) real value is '' NotImplemented = None # (!) real value is '' __spec__ = None # (!) real value is ''
III. Examples of all string data types
# Variable names are capitalized tmp = "zhangyanlin" tmp_new = () print(tmp_new) # Output all types defined by all characters () print(dir(tmp)) #['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] #Capitalize initial letters u1 = "zhang" u2 = () print(u2) #20 defines 20 bits, not enough to _complement_. u1 = "zhang" u2 = (20 ,'_') print(u2) # Look how many times zh appears in the top 10 # u1 = "zhangyanlin is zhgod" u2 = ('zh',0, 10) print(u2) # Get the position in the string that is greater than or equal to 0 and less than 2 u1 = "zhang" print(('h',0,2)) # Convert tabs to spaces u1 = "zhang\t123" print((20)) #Find the digits, the same can only find the first occurrence, no think should be feedback -1 u1 = "zhang hello" print(('h')) # Standing symbols 0 and 1 are representative of standing symbols u1 = "name {0}, age {1}" print(("zhang",18)) u1 = " zhang is yan " #Determine if it's a letter print(()) #Determine if it's a number print(()) # Determine if it's letters and numbers print(()) # Determine if it's lowercase print(()) # Determine if it's a space print(()) #Determine if it's a headline print(()) # Determine if it's all uppercase print(()) #Link the contents of the list together print("_".join(u1)) #Content left-aligned, right-side padding print((1)) #Content to lowercase print(()) # Remove the space on the left print(()) #Remove the space to the right print(()) # Split content with spaces into meta-ancestor types, find them from the left; rpartition splits them from the right print(('is')) #Replace, can be followed by several replacements, from left to right. print(('zh','ZH')) # Find a character to split, split from right, split from left print(('a',1)) # Whether to start with a certain string print(('z')) # Remove both spaces (strip) print(()) # Upper case to lower case, lower case to upper case # print(()) # to uppercase (upper) print(())
IV. Index
u1 = "zhangyanlin" print(u1[0]) print(u1[1]) print(u1[2]) print(u1[3]) print(u1[4]) print(u1[5])
V. Slicing
#Cut out zhan, note: 0 is for the first digit, 4 is for less than four, and know the third digit. u1 = "zhangyanlin" print(u1[0:4])
VI. Cyclic slicing
utilization
u1 = "zhangyanlin" u2 = 0 while u2 < len(u1): print(u1[u2]) u2+=1
utilization
# Loop slicing u1 = "zhangyanlin" for u2 in u1: print(u2) # Loop slices and outputs all but y u1 ="zhangyanlin" for u2 in u1: if u2 =="y": continue print(u2) # Loop slicing, not executed after output to y u1 ="zhangyanlin" for u2 in u1: if u2 =="y": break print(u2)