Skip to content

Instantly share code, notes, and snippets.

@gahan9
Last active April 17, 2018 10:31
Show Gist options
  • Save gahan9/f8513a4e2eb46d778387a7ba9673c310 to your computer and use it in GitHub Desktop.
Save gahan9/f8513a4e2eb46d778387a7ba9673c310 to your computer and use it in GitHub Desktop.
Python Course

Python for Green Bean1

Basic Level

Installation

  • windows
  • linux
  • check installed version of language and modules...

Basic Syntax

  • print statement : seperator, : line endings : what returns?
  • traceback reading : interpret source of error from provided traceback
  • boolean and other condition check : condition evaluation
  • basic math operations : +,-, *, **, //, %
  • dir() function

Data Structures

Note: all data structures in python3 are implemented as class but they are still treated as datatypes in python2

  • string : slicing : manipulating : searching : other operations on string (upper, lower, check for alphabets, numeric, replace, etc)
  • number : integer, float : decimal, fraction
  • Boolean
  • list : slicing : indexing : pop : append : search : sorting : addition : get max, min
  • set : set v/s list : advantage? : list to set order preserve sorting
  • tuple : list v/s tuple : sorting
  • dictionary : advantage? : application : accessing key, value : sort by key/ value : add/update : searching

Flow Control

  • range() function
  • in keyword
  • if condition
  • for loop
  • while loop
  • break, continue, pass and return statement
  • list comprehension
  • dict comprehension

Modules and imports

  • built in module import
  • custom module import : import your own python file
  • circular dependency

Intermediate Level

Bitwise Operators

Handle user inputs

  • read user input
  • validate user input

File Input/Output Handling

  • basic file operation read/write with simple text
  • other file opening modes (r, rb, w, wb, a, a+, etc.) and encoding (utf-8, ascii)
  • file operation image (just read and store)

Advance Level

Error & Exceptions

  • try and except block : try, except, else, finally
  • using built in exception : ValueError, TypeError, ....
  • creating custom exception
  • improvise trace-back while writing custom exception
  • handling and raising exception

Others

  • decorators 2 3
  • iterators
  • generator
  • built in methods like : map, reduce, filter
  • regex

Classes and OOP

  • __init__
  • static method
  • class method
  • getter and setter

Expert Level

Exercise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment