python list comprehension
#example: removing common elements found in `a` from `b`.
a = [1,2,3,4,5]
b = [5,6,7,8,9]
# desired output: [1,2,3,4]
# gets each item found in `a` AND not in `b`
print([i for i in a if i not in b])
python list comprehension
#example: removing common elements found in `a` from `b`.
a = [1,2,3,4,5]
b = [5,6,7,8,9]
# desired output: [1,2,3,4]
# gets each item found in `a` AND not in `b`
print([i for i in a if i not in b])
python data structures
#string
string = 'Hi my name is Dr.Hippo'
#integer(whole number)
integer = 12345
#floating point number
fl = 123.456
#list
li = [1,2,3,,'string',None]
#boolean
t = True
f = False
#none(equivalent to null or undefined in other languages)
n = None
#dictionary
dictionary = {'key':'value'}
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
python list comprehension
#example: removing common elements found in `a` from `b`.
a = [1,2,3,4,5]
b = [5,6,7,8,9]
# desired output: [1,2,3,4]
# gets each item found in `a` AND not in `b`
print([i for i in a if i not in b])
python data structures
#string
string = 'Hi my name is Dr.Hippo'
#integer(whole number)
integer = 12345
#floating point number
fl = 123.456
#list
li = [1,2,3,,'string',None]
#boolean
t = True
f = False
#none(equivalent to null or undefined in other languages)
n = None
#dictionary
dictionary = {'key':'value'}
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us