Python Datatype and Inbuilt Functions

class list(object)
 |  list() -> new empty list
 | 
 | list(iterable) -> new list initialized from iterable's items
 | 
 |  Methods defined here:
 | 
 |  __contains__(self, key, /)
 |      Return key in self.  (works like in operator)
 | 
 |  __delitem__(self, key, /)
 |      Delete self[key]. (works like pop(index) method)
 |
 |  __setitem__(self, key, value, /)
 |      Set self[key] to value.
 | 
 |  __getitem__(...)
 |      x.__getitem__(y) <==> x[y]
 | 
 |  __eq__(self, value, /)
 |      Return self==value.
 | 
 |  __ge__(self, value, /)
 |      Return self>=value.
 | 
 |  __gt__(self, value, /)
 |      Return self>value.
 | 
 |  __le__(self, value, /)
 |      Return self<=value.
 | 
 |  __lt__(self, value, /)
 |      Return self<value.
 | 
 |  __ne__(self, value, /)
 |      Return self!=value.
 | 
 |  __add__(self, value, /)
 |      Return self+value.
 | (value is a list work like extend return a new list keeping the original list unchanged)
 | 
 |  __iadd__(self, value, /)
 |      Implement self+=value.
 | (value is a list work like extend return a changed list keeping the original list changed)
 |
 |  __mul__(self, value, /)
 |      Return self*value.n
 |>>> l
 |[1, 2, 3]
 |>>> l.__mul__(3)
 |[1, 2, 3, 1, 2, 3, 1, 2, 3]
 | 
 |  __imul__(self, value, /)
 |      Implement self*=value.
 | (Implement changes the original value i.e list)
 | 
 |  __len__(self, /)
 |      Return len(self).
 | 
 |  __iter__(self, /)
 |      Implement iter(self). (convert list into iterator object)
 | 
 |  __reversed__(...)
 |      L.__reversed__() -- return a reverse iterator over the list
 | 
 |  __sizeof__(...)
 |      L.__sizeof__() -- size of L in memory, in bytes
 |
 |  append(...)
 |      L.append(object) -> None -- append object to end
 | 
 |  clear(...)
 |      L.clear() -> None -- remove all items from L
 | 
 |  copy(...)
 |      L.copy() -> list -- a shallow copy of L
 | 
 |  count(...)
 |      L.count(value) -> integer -- return number of occurrences of value
 | 
 |  extend(...)
 |      L.extend(iterable) -> None -- extend list by appending elements from the iterable
 | 
 |  index(...)
 |      L.index(value, [start, [stop]]) -> integer -- return first index of value.
 |      Raises ValueError if the value is not present.
 | 
 |  insert(...)
 |      L.insert(index, object) -- insert object before index
 | 
 |  pop(...)
 |      L.pop([index]) -> item -- remove and return item at index (default last).
 |      Raises IndexError if list is empty or index is out of range.
 | 
 |  remove(...)
 |      L.remove(value) -> None -- remove first occurrence of value.
 |      Raises ValueError if the value is not present.
 | 
 |  reverse(...)
 |      L.reverse() -- reverse *IN PLACE*
 | 
 |  sort(...)
 |      L.sort(key=None, reverse=False) -> None -- stable sort *IN PLACE*
 | 
 |  ----------------------------------------------------------------------

class dict(object)
 |
 |  dict() -> new empty dictionary
 |
 |  dict(mapping) -> new dictionary initialized from a mapping object's
 |      (key, value) pairs
 |
 |  dict(iterable) -> new dictionary initialized as if via:
 |      d = {}
 |      for k, v in iterable:
 |          d[k] = v
 |
 |  dict(**kwargs) -> new dictionary initialized with the name=value pairs
 |      in the keyword argument list.  For example:  dict(one=1, two=2)
 | 
 |  Methods defined here:
 | 
 |  __contains__(self, key, /)
 |      True if D has a key k, else False.
 | 
 |  __delitem__(self, key, /)
 |      Delete self[key].
 | 
 |  __getitem__(...)
 |      x.__getitem__(y) <==> x[y]
 | 
 |  __setitem__(self, key, value, /)
 |      Set self[key] to value.
 | 
 |  __eq__(self, value, /)
 |      Return self==value.
 | 
 |  __ge__(self, value, /)
 |      Return self>=value.
 | 
 |  __gt__(self, value, /)
 |      Return self>value.
 | 
 |  __le__(self, value, /)
 |      Return self<=value.
 | 
 |  __lt__(self, value, /)
 |      Return self<value.
 | 
 |  __ne__(self, value, /)
 |      Return self!=value.
 | 
 |  __iter__(self, /)
 |      Implement iter(self).
 | 
 |  __len__(self, /)
 |      Return len(self).
 | 
 |  __sizeof__(...)
 |      D.__sizeof__() -> size of D in memory, in bytes
 | 
 |  clear(...)
 |      D.clear() -> None.  Remove all items from D.
 | 
 |  copy(...)
 |      D.copy() -> a shallow copy of D
 | 
 |  fromkeys(iterable, value=None, /) from builtins.type
 |      Returns a new dict with keys from iterable and values equal to value.
 | 
 |  get(...)
 |      D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
 | 
 |  items(...)
 |      D.items() -> a set-like object providing a view on D's items
 | 
 |  keys(...)
 |      D.keys() -> a set-like object providing a view on D's keys
 | 
 |  pop(...)
 |      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
 |      If key is not found, d is returned if given, otherwise KeyError is raised
 | 
 |  popitem(...)
 |      D.popitem() -> (k, v), remove and return some (key, value) pair as a
 |      2-tuple; but raise KeyError if D is empty.
 | 
 |  setdefault(...)
 |      D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
 | 
 |  update(...)
 |      D.update([E, ]**F) -> None.  Update D from dict/iterable E and F.
 |      If E is present and has a .keys() method, then does:  for k in E: D[k] = E[k]
 |      If E is present and lacks a .keys() method, then does:  for k, v in E: D[k] = v
 |      In either case, this is followed by: for k in F:  D[k] = F[k]
 | 
 |  values(...)
 |      D.values() -> an object providing a view on D's values
 | 
 |  ----------------------------------------------------------------------


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 sys.getdefaultencoding().
 |  errors defaults to 'strict'.
 | 
 |  Methods defined here:
 | 
 |  __add__(self, value, /)
 |      Return self+value.
 | 
 |  __contains__(self, key, /)
 |      Return key in self.
 | 
 |  __eq__(self, value, /)
 |      Return self==value.
 | 
 |  __format__(...)
 |      S.__format__(format_spec) -> str
 |     
 |      Return a formatted version of S as described by format_spec.
 | 
 |  __ge__(self, value, /)
 |      Return self>=value.
 | 
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 | 
 |  __getitem__(self, key, /)
 |      Return self[key].
 | 
 |  __getnewargs__(...)
 | 
 |  __gt__(self, value, /)
 |      Return self>value.
 | 
 |  __hash__(self, /)
 |      Return hash(self).
 | 
 |  __iter__(self, /)
 |      Implement iter(self).
 | 
 |  __le__(self, value, /)
 |      Return self<=value.
 | 
 |  __len__(self, /)
 |      Return len(self).
 | 
 |  __lt__(self, value, /)
 |      Return self<value.
 | 
 |  __mod__(self, value, /)
 |      Return self%value.
 | 
 |  __mul__(self, value, /)
 |      Return self*value.n
 | 
 |  __ne__(self, value, /)
 |      Return self!=value.
 | 
 |  __new__(*args, **kwargs) from builtins.type
 |      Create and return a new object.  See help(type) for accurate signature.
 | 
 |  __repr__(self, /)
 |      Return repr(self).
 | 
 |  __rmod__(self, value, /)
 |      Return value%self.
 | 
 |  __rmul__(self, value, /)
 |      Return self*value.
 | 
 |  __sizeof__(...)
 |      S.__sizeof__() -> size of S in memory, in bytes
 | 
 |  __str__(self, /)
 |      Return str(self).
 | 
 |  capitalize(...)
 |      S.capitalize() -> str
 |     
 |      Return a capitalized version of S, i.e. make the first character
 |      have upper case and the rest lower case.
 | 
 |  casefold(...)
 |      S.casefold() -> str
 |     
 |      Return a version of S suitable for caseless comparisons.
 | 
 |  center(...)
 |      S.center(width[, fillchar]) -> str
 |     
 |      Return S centered in a string of length width. Padding is
 |      done using the specified fill character (default is a space)
 | 
 |  count(...)
 |      S.count(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.
 | 
 |  encode(...)
 |      S.encode(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.
 | 
 |  endswith(...)
 |      S.endswith(suffix[, start[, end]]) -> bool
 |     
 |      Return True if S ends with the specified suffix, False otherwise.
 |      With optional start, test S beginning at that position.
 |      With optional end, stop comparing S at that position.
 |      suffix can also be a tuple of strings to try.
 | 
 |  expandtabs(...)
 |      S.expandtabs(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.
 | 
 |  find(...)
 |      S.find(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.
 | 
 |  format(...)
 |      S.format(*args, **kwargs) -> str
 |     
 |      Return a formatted version of S, using substitutions from args and kwargs.
 |      The substitutions are identified by braces ('{' and '}').
 | 
 |  format_map(...)
 |      S.format_map(mapping) -> str
 |     
 |      Return a formatted version of S, using substitutions from mapping.
 |      The substitutions are identified by braces ('{' and '}').
 | 
 |  index(...)
 |      S.index(sub[, start[, end]]) -> int
 |     
 |      Like S.find() but raise ValueError when the substring is not found.
 |  isalnum(...)
 |      S.isalnum() -> bool
 |     
 |      Return True if all characters in S are alphanumeric
 |      and there is at least one character in S, False otherwise.
 | 
 |  isalpha(...)
 |      S.isalpha() -> bool
 |     
 |      Return True if all characters in S are alphabetic
 |      and there is at least one character in S, False otherwise.
 | 
 |  isdecimal(...)
 |      S.isdecimal() -> bool
 |     
 |      Return True if there are only decimal characters in S,
 |      False otherwise.
 | 
 |  isdigit(...)
 |      S.isdigit() -> bool
 |     
 |      Return True if all characters in S are digits
 |      and there is at least one character in S, False otherwise.
 | 
 |  isidentifier(...)
 |      S.isidentifier() -> bool
 |     
 |      Return True if S is a valid identifier according
 |      to the language definition.
 |     
 |      Use keyword.iskeyword() to test for reserved identifiers
 |      such as "def" and "class".
 | 
 |  islower(...)
 |      S.islower() -> bool
 |     
 |      Return True if all cased characters in S are lowercase and there is
 |      at least one cased character in S, False otherwise.
 | 
 |  isnumeric(...)
 |      S.isnumeric() -> bool
 |      Return True if there are only numeric characters in S,
 |      False otherwise.
 | 
 |  isprintable(...)
 |      S.isprintable() -> bool
 |     
 |      Return True if all characters in S are considered
 |      printable in repr() or S is empty, False otherwise.
 | 
 |  isspace(...)
 |      S.isspace() -> bool
 |     
 |      Return True if all characters in S are whitespace
 |      and there is at least one character in S, False otherwise.
 | 
 |  istitle(...)
 |      S.istitle() -> bool
 |     
 |      Return True if S is a titlecased string and there is at least one
 |      character in S, i.e. upper- and titlecase characters may only
 |      follow uncased characters and lowercase characters only cased ones.
 |      Return False otherwise.
 | 
 |  isupper(...)
 |      S.isupper() -> bool
 |     
 |      Return True if all cased characters in S are uppercase and there is
 |      at least one cased character in S, False otherwise.
 | 
 |  join(...)
 |      S.join(iterable) -> str
 |     
 |      Return a string which is the concatenation of the strings in the
 |      iterable.  The separator between elements is S.
 | 
 |  ljust(...)
 |      S.ljust(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).
 |  lower(...)
 |      S.lower() -> str
 |     
 |      Return a copy of the string S converted to lowercase.
 | 
 |  lstrip(...)
 |      S.lstrip([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.
 | 
 |  partition(...)
 |      S.partition(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.
 | 
 |  replace(...)
 |      S.replace(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.
 | 
 |  rfind(...)
 |      S.rfind(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.
 | 
 |  rindex(...)
 |      S.rindex(sub[, start[, end]]) -> int
 |     
 |      Like S.rfind() but raise ValueError when the substring is not found.
 | 
 |  rjust(...)
 |      S.rjust(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).
 | 
 |  rpartition(...)
 |      S.rpartition(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.
 | 
 |  rsplit(...)
 |      S.rsplit(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.
 | 
 |  rstrip(...)
 |      S.rstrip([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.
 | 
 |  split(...)
 |      S.split(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.
 | 
 |  splitlines(...)
 |      S.splitlines([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.
 | 
 |  startswith(...)
 |      S.startswith(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.
 | 
 |  strip(...)
 |      S.strip([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.
 | 
 |  swapcase(...)
 |      S.swapcase() -> str
 |     
 |      Return a copy of S with uppercase characters converted to lowercase
 |      and vice versa.
 | 
 |  title(...)
 |      S.title() -> str
 |     
 |      Return a titlecased version of S, i.e. words start with title case
 |      characters, all remaining cased characters have lower case.
 | 
 |  translate(...)
 |      S.translate(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.
 | 
 |  upper(...)
 |      S.upper() -> str
 |     
 |      Return a copy of S converted to uppercase.
 |  zfill(...)
 |      S.zfill(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.
 | 
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 | 
 |  maketrans(x, y=None, z=None, /)
 |      Return a translation table usable for str.translate().
 |     
 |      If there is only one argument, it must be a dictionary mapping Unicode
 |      ordinals (integers) or characters to Unicode ordinals, strings or None.
 |      Character keys will be then converted to ordinals.
 |      If there are two arguments, they must be strings of equal length, and
 |      in the resulting dictionary, each character in x will be mapped to the
 |      character at the same position in y. If there is a third argument, it
 |      must be a string, whose characters will be mapped to None in the result.

 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.
  | 
  |  Methods defined here:
  | 
  |  __add__(self, value, /)
  |      Return self+value.
  | 
  |  __contains__(self, key, /)
  |      Return key in self.
  | 
  |  __eq__(self, value, /)
  |      Return self==value.
  | 
  |  __ge__(self, value, /)
  |      Return self>=value.
  | 
  |  __getattribute__(self, name, /)
  |      Return getattr(self, name).
  | 
  |  __getitem__(self, key, /)
  |      Return self[key].
  | 
  |  __getnewargs__(...)
  | 
  |  __gt__(self, value, /)
  |      Return self>value.
  | 
  |  __hash__(self, /)
  |      Return hash(self).
  | 
  |  __iter__(self, /)
  |      Implement iter(self).
  | 
  |  __le__(self, value, /)
  |      Return self<=value.
  |  __len__(self, /)
   |      Return len(self).
   | 
   |  __lt__(self, value, /)
   |      Return self<value.
   | 
   |  __mul__(self, value, /)
   |      Return self*value.n
   | 
   |  __ne__(self, value, /)
   |      Return self!=value.
   | 
   |  __new__(*args, **kwargs) from builtins.type
   |      Create and return a new object.  See help(type) for accurate signature.
   | 
   |  __repr__(self, /)
   |      Return repr(self).
   | 
   |  __rmul__(self, value, /)
   |      Return self*value.
   | 
   |  count(...)
   |      T.count(value) -> integer -- return number of occurrences of value
   | 
   |  index(...)
   |      T.index(value, [start, [stop]]) -> integer -- return first index of value.
   |      Raises ValueError if the value is not present.


0 comments:

Copyright © 2013 SoftKul