python structure code example
Example 1: python list comprehension
a = [1,2,3,4,5]
b = [5,6,7,8,9]
print([i for i in a if i not in b])
Example 2: python data structures
string = 'Hi my name is Dr.Hippo'
integer = 12345
fl = 123.456
li = [1,2,3,,'string',None]
t = True
f = False
n = None
dictionary = {'key':'value'}
Example 3: python structure
$ pwd
~/code/sandman
$ tree
.
|- LICENSE
|- README.md
|- TODO.md
|- docs
| |-- conf.py
| |-- generated
| |-- index.rst
| |-- installation.rst
| |-- modules.rst
| |-- quickstart.rst
| |-- sandman.rst
|- requirements.txt
|- sandman
| |-- __init__.py
| |-- exception.py
| |-- model.py
| |-- sandman.py
| |-- test
| |-- models.py
| |-- test_sandman.py
|- setup.py