1 >>> dir(__builtins__)//查看内置函数(BIF)列表2 [‘ArithmeticError‘, ‘AssertionError‘, ‘AttributeError‘,3 ‘BaseException‘, ‘BlockingIOError‘, ‘BrokenPipeError‘, ‘BufferError‘, ‘BytesWarning‘,4 ‘ChildProcessError‘, ‘ConnectionAbortedError‘, ‘ConnectionError‘, ‘ConnectionRefusedError‘, ‘ConnectionResetError‘,5 ‘DeprecationWarning‘,6 ‘EOFError‘, ‘Ellipsis‘, ‘EnvironmentError‘, ‘Exception‘,7 ‘False‘, ‘FileExistsError‘, ‘FileNotFoundError‘, ‘FloatingPointError‘, ‘FutureWarning‘,8 ‘GeneratorExit‘,9 ‘IOError‘, ‘ImportError‘, ‘ImportWarning‘, ‘IndentationError‘, ‘IndexError‘, ‘InterruptedError‘, ‘IsADirectoryError‘,10 ‘KeyError‘, ‘KeyboardInterrupt‘,11 ‘LookupError‘,12 ‘MemoryError‘, 13 NameError‘,‘None‘,‘NotADirectoryError‘,‘NotImplemented‘,‘NotImplementedError‘,
14 ‘OSError‘, ‘OverflowError‘,15 ‘PendingDeprecationWarning‘, ‘PermissionError‘, ‘ProcessLookupError‘,16 ‘RecursionError‘, ‘ReferenceError‘, ‘ResourceWarning‘, ‘RuntimeError‘, ‘RuntimeWarning‘,17 ‘StopAsyncIteration‘, ‘StopIteration‘, ‘SyntaxError‘, ‘SyntaxWarning‘, ‘SystemError‘, ‘SystemExit‘,18 ‘TabError‘, ‘TimeoutError‘, ‘True‘, ‘TypeError‘,19 ‘UnboundLocalError‘, ‘UnicodeDecodeError‘, ‘UnicodeEncodeError‘, ‘UnicodeError‘, ‘UnicodeTranslateError‘, ‘UnicodeWarning‘, ‘UserWarning‘,20 ‘ValueError‘,21 ‘Warning‘, ‘WindowsError‘,22 ‘ZeroDivisionError‘,23 ‘_‘, ‘__build_class__‘, ‘__debug__‘, ‘__doc__‘, ‘__import__‘, ‘__loader__‘, ‘__name__‘, ‘__package__‘, ‘__spec__‘,24 ‘abs‘, ‘all‘, ‘any‘, ‘ascii‘,25 ‘bin‘, ‘bool‘, ‘bytearray‘, ‘bytes‘,26 ‘callable‘, ‘chr‘, ‘classmethod‘, ‘compile‘, ‘complex‘, ‘copyright‘, ‘credits‘,27 ‘delattr‘, ‘dict‘, ‘dir‘, ‘divmod‘,28 ‘enumerate‘, ‘eval‘, ‘exec‘, ‘exit‘,29 ‘filter‘, ‘float‘, ‘format‘, ‘frozenset‘,30 ‘getattr‘, ‘globals‘,31 ‘hasattr‘, ‘hash‘, ‘help‘, ‘hex‘,32 ‘id‘, ‘input‘, ‘int‘, ‘isinstance‘, ‘issubclass‘, ‘iter‘,33 ‘len‘, ‘license‘, ‘list‘, ‘locals‘,34 ‘map‘, ‘max‘, ‘memoryview‘, ‘min‘,35 ‘next‘,36 ‘object‘, ‘oct‘, ‘open‘, ‘ord‘,37 ‘pow‘, ‘print‘, ‘property‘,38 ‘quit‘,39 ‘range‘, ‘repr‘, ‘reversed‘, ‘round‘,40 ‘set‘, ‘setattr‘, ‘slice‘, ‘sorted‘, ‘staticmethod‘, ‘str‘, ‘sum‘, ‘super‘,41 ‘tuple‘, ‘type‘,42 ‘vars‘,43 ‘zip‘]44 >>> help(input)//查看内置函数(BIF)功能描述45 Help on built-in function input inmodule builtins:46
47 input(prompt=None, /)48 Read a string from standard input. The trailing newline isstripped.49
50 The prompt string, if given, isprinted to standard output without a51 trailing newline before reading input.52
53 If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raiseEOFError.54 On *nix systems, readline is used ifavailable.55
56 >>>help(range)57 Help on class range inmodule builtins:58
59 classrange(object)60 | range(stop) ->range object61 | range(start, stop[, step]) ->range object62 |
63 | Return an object that produces a sequence of integers fromstart (inclusive)64 | to stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1.65 | start defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3.66 | These are exactly the valid indices for a list of 4elements.67 | When step is given, it specifies the increment (ordecrement).68 |
69 |Methods defined here:70 |
71 | __contains__(self, key, /)72 | Return key inself.73 |
74 | __eq__(self, value, /)75 | Return self==value.76 |
77 | __ge__(self, value, /)78 | Return self>=value.79 |
80 | __getattribute__(self, name, /)81 |Return getattr(self, name).82 |
83 | __getitem__(self, key, /)84 |Return self[key].85 |
86 | __gt__(self, value, /)87 | Return self>value.88 |
89 | __hash__(self, /)90 |Return hash(self).91 |
92 | __iter__(self, /)93 |Implement iter(self).94 |
95 | __le__(self, value, /)96 | Return self<=value.97 |
98 | __len__(self, /)99 |Return len(self).100 |
101 | __lt__(self, value, /)102 | Return self
104 | __ne__(self, value, /)105 | Return self!=value.106 |
107 | __new__(*args, **kwargs) frombuiltins.type108 | Create and return a new object. See help(type) foraccurate signature.109 |
110 | __reduce__(...)111 | helper forpickle112 |
113 | __repr__(self, /)114 |Return repr(self).115 |
116 | __reversed__(...)117 |Return a reverse iterator.118 |
119 |count(...)120 | rangeobject.count(value) -> integer -- returnnumber of occurrences of value121 |
122 |index(...)123 | rangeobject.index(value, [start, [stop]]) -> integer -- returnindex of value.124 | Raise ValueError if the value is notpresent.125 |
126 | ----------------------------------------------------------------------
127 |Data descriptors defined here:128 |
129 |start130 |
131 |step132 |
133 | stop