Python

Notes on programming languages $\blacktriangleright$ Python $\blacktriangleright$ ...

Note

Language

tmp (build-in functions)
not
any
all
reversed(seq)
mydict = dict(mykey1 = 3
,mykey2 = 'hi'
)
isinstance(3, int)
isinstance('3', int)
callableI(f)
iter(o)
input()
Terminal args
from sys import argv as arguments
 
 
def get():
    return [(i, v) for i, v in enumerate(arguments)]
    # Add if i > 0 if you want to neglect the .py
 
 
def main():
    print("\nHere is what main returns in pretty-print:")
    for index, arg in get():
        print(index, arg)
 
 
if __name__ == '__main__':
    main()

Discussion

Reference

Basics including prelude:

Python.org

The Python Standard Library

Code examples

Requirements

Notes on programming languages