In [2]:
import fibo

In [2]:
fibo.fib(1000)


1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,

In [4]:
fibo.fib2(100)


Out[4]:
[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]

In [5]:
fib = fibo.fib
fib(500)


1,1,2,3,5,8,13,21,34,55,89,144,233,377,

In [6]:
from fibo import fib,fib2
fib(500)


1,1,2,3,5,8,13,21,34,55,89,144,233,377,

In [3]:
from fibo import *
fib(300)


1,1,2,3,5,8,13,21,34,55,89,144,233,

In [6]:
python fibo.py <arguments>


  File "<ipython-input-6-05f7cc37154c>", line 1
    python fibo.py <arguments>
              ^
SyntaxError: invalid syntax

In [8]:
if __name__ == "__main__":
    import sys
    fib(int(sys.argv[1]))


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-8-79ccec387f6a> in <module>()
      1 if __name__ == "__main__":
      2     import sys
----> 3     fib(int(sys.argv[1]))

ValueError: invalid literal for int() with base 10: '-f'

In [9]:
>>> import sys
>>> sys.ps1
'>>> '
>>> sys.ps2
'... '
>>> sys.ps1 = 'C> '

In [10]:
>>> import fibo, sys
>>> dir(fibo)


Out[10]:
['__builtins__',
 '__cached__',
 '__doc__',
 '__file__',
 '__loader__',
 '__name__',
 '__package__',
 '__spec__',
 'fib',
 'fib2']

In [ ]:
>>> dir(sys)

In [11]:
>>> import builtins
>>> dir(builtins)


Out[11]:
['ArithmeticError',
 'AssertionError',
 'AttributeError',
 'BaseException',
 'BlockingIOError',
 'BrokenPipeError',
 'BufferError',
 'BytesWarning',
 'ChildProcessError',
 'ConnectionAbortedError',
 'ConnectionError',
 'ConnectionRefusedError',
 'ConnectionResetError',
 'DeprecationWarning',
 'EOFError',
 'Ellipsis',
 'EnvironmentError',
 'Exception',
 'False',
 'FileExistsError',
 'FileNotFoundError',
 'FloatingPointError',
 'FutureWarning',
 'GeneratorExit',
 'IOError',
 'ImportError',
 'ImportWarning',
 'IndentationError',
 'IndexError',
 'InterruptedError',
 'IsADirectoryError',
 'KeyError',
 'KeyboardInterrupt',
 'LookupError',
 'MemoryError',
 'NameError',
 'None',
 'NotADirectoryError',
 'NotImplemented',
 'NotImplementedError',
 'OSError',
 'OverflowError',
 'PendingDeprecationWarning',
 'PermissionError',
 'ProcessLookupError',
 'ReferenceError',
 'ResourceWarning',
 'RuntimeError',
 'RuntimeWarning',
 'StopIteration',
 'SyntaxError',
 'SyntaxWarning',
 'SystemError',
 'SystemExit',
 'TabError',
 'TimeoutError',
 'True',
 'TypeError',
 'UnboundLocalError',
 'UnicodeDecodeError',
 'UnicodeEncodeError',
 'UnicodeError',
 'UnicodeTranslateError',
 'UnicodeWarning',
 'UserWarning',
 'ValueError',
 'Warning',
 'ZeroDivisionError',
 '__IPYTHON__',
 '__IPYTHON__active',
 '__build_class__',
 '__debug__',
 '__doc__',
 '__import__',
 '__loader__',
 '__name__',
 '__package__',
 '__spec__',
 'abs',
 'all',
 'any',
 'ascii',
 'bin',
 'bool',
 'bytearray',
 'bytes',
 'callable',
 'chr',
 'classmethod',
 'compile',
 'complex',
 'copyright',
 'credits',
 'delattr',
 'dict',
 'dir',
 'divmod',
 'dreload',
 'enumerate',
 'eval',
 'exec',
 'filter',
 'float',
 'format',
 'frozenset',
 'get_ipython',
 'getattr',
 'globals',
 'hasattr',
 'hash',
 'help',
 'hex',
 'id',
 'input',
 'int',
 'isinstance',
 'issubclass',
 'iter',
 'len',
 'license',
 'list',
 'locals',
 'map',
 'max',
 'memoryview',
 'min',
 'next',
 'object',
 'oct',
 'open',
 'ord',
 'pow',
 'print',
 'property',
 'range',
 'repr',
 'reversed',
 'round',
 'set',
 'setattr',
 'slice',
 'sorted',
 'staticmethod',
 'str',
 'sum',
 'super',
 'tuple',
 'type',
 'vars',
 'zip']