Skip to content

Satishrajc/python_practice

Repository files navigation

Python Practice

Key points to concentrate

Basics

  • Bytecode (.pyc)
  • Data structures (string, integer, list, tuple, dictionary, set)
  • Operators: logical and arithmetic --> &, or, not ---> =, !=, >, <, =>, =<, +, -, *, /, %, //
  • Basic methods: print, input, len, math, max, min, type, dir, help, range, enumerate, zip, round
  • All the key-words
  • What are the keywords/functions: pass, lambda, map, filter, any, yield
  • Conditions: if, else, elif
  • Loops: for, else, while and recursive, break, continue
  • Exceptions: try, except, else, finally
  • File handling: open, close, with, write, read, readline, readlines, seek, tell

Basics ++

  • Common functions: map, filter and lambda
  • Generators
  • Decorators with arguments and multiple decorators, class based decorators(call)
  • Regular expression
  • Inbuilt libraries: os, sys, time, datetime, calendar, logging, random, json, subprocess, argparse
  • Good libraries: numpy, matplot, openpyxl, openCV, pillow,

Object-Oriented Programming (OOPS)Concepts

  • Class, instant
  • Class variable, class methods, normal methods,
  • Method variables, semiPrivate variable,_ private variables, object.className_ private variables
  • Dander methods: init,del, str, repr, iter, dir, name
  • In build method: isintance, issubclass
  • Multiple Inheritance and Method resolution(MRO): Single , Multi-Level, Hierarchical and Multiple
  • Polymorphism: method overloading, method overriding, operation overloading
  • Decorators: @property, @setter, @deleter, @class method, @staticmethod

Advance

  • Threading and multithreading
  • Multiprocessing
  • Data structure and Algorithms
  • Pytest
  • Design patterns

Data types in Python

  1. List is a collection which is ordered and changeable. Allows duplicate members.
  2. Tuple is a collection which is ordered and unchangeable. Allows duplicate members.
  3. Set is a collection which is unordered and unindexed. No duplicate members.
  4. Dictionary is a collection which is ordered and changeable. No duplicate members.

Builtin functions for all the data types

List

  1. list.append()
  2. list.clear()
  3. list.copy()
  4. list.count()
  5. list.extend()
  6. list.index()
  7. list.insert()
  8. list.pop()
  9. list.remove()
  10. list.reverse

Tuple

  1. tuple.count()
  2. tuple.index()

Dictionary

  1. clear()
  2. copy()
  3. fromkeys()
  4. get()
  5. items()
  6. keys()
  7. pop()
  8. popitem()
  9. setdefault()
  10. update()
  11. values()

Sets

  1. add()
  2. clear()
  3. copy()
  4. difference()
  5. difference_update()
  6. discard()
  7. intersection()
  8. intersection_update()
  9. isdisjoint()
  10. issubset()
  11. issuperset()
  12. pop()
  13. remove()
  14. symmetric_difference()
  15. symmetric_difference_update()
  16. union()
  17. update()

Notes

  1. As of Python version 3.7, dictionaries are ordered. In Python 3.6 and earlier, dictionaries are unordered.
  2. From Python3 tuple compression is act as generators
  3. After slicing lists, change in the copied array will change the copying array elements

Git setup

Generating a new SSH key and adding it to the ssh-agent:

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

Adding a new SSH key to your GitHub account:

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

Testing your SSH connection:

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection

Creating a personal access token:

https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

Learning Links:

  1. Advance Tutorial: https://www.youtube.com/watch?v=KSiRzuSx120&list=PL7yh-TELLS1FuqLSjl5bgiQIEH25VEmIc
  2. 5 Mini Python Projects - For Beginners: https://www.youtube.com/watch?v=DLn3jOsNRVE

About

Helps to learn Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages