Engineering 42 Python Basics

This report contains out basics for python. This course will cover the following:

  1. Set up
  2. Datatype: - Strings - Integer - Float - Boolean - Dates and Times - Lists (Collections) - Dictionaries
  3. Control flow: - ifs - for loop - While loops variable & operators – strings, integers, equating,
  4. Functions: - DRY - TDD (Test driven development)
  5. OOP – Object orientated programming: - OOP - Four Pillars - External Packages
  6. Files and Error Handling
  7. SQL
  8. JSON
  9. HTTP & APIs
  10. Build API with FLASK
  • GIT, GITHUB, DOCUMENTATION with MARKDOWN

##Recap of data types

String

Define using '' and "".

They are list of characters.

Int, Floats

Number and decimals. You can

Lists

Defined with [] You add using .append() and you remove entries using .pop().

Use the index to access a record.

$ my_list[4]
> 'iten in list'

Dictionary

Defined using {}

You can add simmple generating a new key pair.

my_dictionary['newkey'] = 'value'

You can access values using it's key.

$ my_dictionary['key']
>'value'