Python fundamentals


my_list = [1,"string",3,4,5]
for item in my_list:
    print item

# Append/push to list


Always good to modular your code.

def addNumbers(numberOne, numberTwo):
    return numberOne + numberTwo

import module1

total = module1.addNumbers(1,2)
print total

Pip - package management

Pip is the python package manager. It ca be used to download other modules.

Install pip

sudo apt-get install python-pip

To install package

pip install package

results matching ""

    No results matching ""