Python

  1. Introduction
  2. Installation
  3. print() function
    print(“Hello World”)
  4. string multiplication 
    print(“Hi” * 10)
  5. Comments
    single line #
    multiline comments “””
  6. Concatenation operator +
  7. Variables
    • int
    • string
    • boolean
    • float
    • None – unline Java there is no null available in python instead use None
  8. type() function
  9. Variable’s id and is Operator
  10. Operators
    • addition +
    • subtraction
    • multiplication *
    • power of **
    • division /
    • int division //
    • modulus %
  11. input() function
  12. type conversion / type casting
    • int(’10’)
    • str(9)
    • float(‘10.5’)
    • bool(‘True’)
  13. String
    • string with single quote ‘string’
    • string with double quote “string”
    • heredoc – string with triple quote ”’ or “””  
      heredoc_var = ”’
      this is line 1
      this is line 2
      this is line 3
      ”’
  14. Formatted String
    print(f”2 * 2 = {2 * 2}”)
    print(f”Hello {fname} {lname}”)
  15. String Functions
    • len(‘string’) – this is general purpose function can be used for string and list also
    • ‘string’.upper()
    • ‘StrinG’.lower()
    • ‘this is string’.capitalize()
    • ‘this is string’.title()
    • ‘rain in spain’.find(‘spain’)
    • ‘replace x with y’.replace(‘x’, ‘y’)
    • ‘this is main string which contains substring’.find(‘substring’) – this returns index number if found else return -1
    • ‘substring’ in ‘this is main string which contains substring’ – this returns boolean value
  16. Math functions
    • round(7.3)
    • abs(-1234)
    • math.ceil(7.3)
    • math.floor(7.3)
    • format decimal point
      print(“{:.2f}“.format(7.3333333333333)
  17. Conditional Statements:
    1. if
    2. if…else
    3. if…elif…else (Ladder if)
  18. Increment and Decrement
    • x += 1
    • x -= 1
  19. Loop
    1. while
    2. for
  20. Control Statements
    1. Break
    2. Continue
    3. Pass
  21. Functions
    • parameter-less function
    • parameterized function
    • function not returning value
    • function returning value
  22. [List], (Tuple), {Set}, {Dictionary: (Associative Array)}
  23. Modules
  24. Exception Handling
  25. OOPS
    1. Classes and Objects
    2. Encapsulation
    3. Abstraction
    4. Inheritance
    5. Static Method
    6. Method Overriding
    7. Private and Public data and variables
    8. Polymorphism
  26. Regular Expression
  27. Modules: OS, PyMySQL, MySQLDB, Pickle, NumPy, Pandas, sklearn
  28. Database Connection
  29. Multithreading
  30. Project (POC)

ALGORITHMS

  • Linear Search
  • Sorting
  • KNN
  • Recommendation System