From 00a8b7995b6669374843fd546f2344dc24b46a84 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sat, 13 Aug 2022 18:25:29 +0400 Subject: [PATCH] Add python advanced topics resources --- .../100-oop/100-methods-dunder.md | 15 ++++++++++++++- .../100-oop/101-inheritance.md | 9 ++++++++- .../100-oop/102-classes.md | 10 +++++++++- .../102-python-advanced-topics/100-oop/readme.md | 9 ++++++++- .../101-regular-expressions.md | 10 +++++++++- .../102-python-advanced-topics/102-decorators.md | 8 +++++++- .../102-python-advanced-topics/103-lambdas.md | 9 ++++++++- .../102-python-advanced-topics/104-iterators.md | 8 +++++++- .../105-modules/100-builtin-modules.md | 9 ++++++++- .../105-modules/101-custom-modules.md | 9 ++++++++- .../105-modules/readme.md | 9 ++++++++- .../content/102-python-advanced-topics/readme.md | 4 +++- 12 files changed, 97 insertions(+), 12 deletions(-) diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/100-methods-dunder.md b/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/100-methods-dunder.md index 257908302..a6a96f85a 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/100-methods-dunder.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/100-methods-dunder.md @@ -1 +1,14 @@ -# Methods dunder \ No newline at end of file +# Methods and Dunder + +A method in python is somewhat similar to a function, except it is associated with object/classes. Methods in python are very similar to functions except for two major differences. + +* The method is implicitly used for an object for which it is called. +* The method is accessible to data that is contained within the class. + +Dunder or magic methods in Python are the methods having two prefix and suffix underscores in the method name. Dunder here means “Double Under (Underscores)”. These are commonly used for operator overloading. Few examples for magic methods are: __init__, __add__, __len__, __repr__ etc. + +Free Content +Method vs Function in Python +Dunder or magic methods in Python +Python - Magic or Dunder Methods + diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/101-inheritance.md b/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/101-inheritance.md index a2e8e0baf..21af3e6a2 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/101-inheritance.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/101-inheritance.md @@ -1 +1,8 @@ -# Inheritance \ No newline at end of file +# Inheritance + +Inheritance allows us to define a class that inherits all the methods and properties from another class. + +Free Content +Python Inheritance +Inheritance in Python + diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/102-classes.md b/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/102-classes.md index f4ae2a543..d764c2458 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/102-classes.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/102-classes.md @@ -1 +1,9 @@ -# Classes \ No newline at end of file +# Classes + +A class is a user-defined blueprint or prototype from which objects are created. Classes provide a means of bundling data and functionality together. Creating a new class creates a new type of object, allowing new instances of that type to be made. Each class instance can have attributes attached to it for maintaining its state. Class instances can also have methods (defined by their class) for modifying their state. + +Free Content +Classes in Python +Python Classes and Objects +Python Classes and Objects + diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/readme.md b/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/readme.md index 70389d826..ed4e61ca1 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/readme.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/100-oop/readme.md @@ -1 +1,8 @@ -# Oop \ No newline at end of file +# OOP + +In Python, object-oriented Programming (OOPs) is a programming paradigm that uses objects and classes in programming. It aims to implement real-world entities like inheritance, polymorphisms, encapsulation, etc. in the programming. The main concept of OOPs is to bind the data and the functions that work on that together as a single unit so that no other part of the code can access this data. + +Free Content +Object Oriented Programming in Python +Python OOP Concepts + diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/101-regular-expressions.md b/content/roadmaps/107-python/content/102-python-advanced-topics/101-regular-expressions.md index 259ff48ef..72b2c446d 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/101-regular-expressions.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/101-regular-expressions.md @@ -1 +1,9 @@ -# Regular expressions \ No newline at end of file +# Regular Expressions + +A regular expression is a sequence of characters that specifies a search pattern in text. Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation. + +Free Content +Regular Expressions in Python +Python Regular Expressions +Python - Regular Expressions + diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/102-decorators.md b/content/roadmaps/107-python/content/102-python-advanced-topics/102-decorators.md index cdf44496f..8c6891f66 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/102-decorators.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/102-decorators.md @@ -1 +1,7 @@ -# Decorators \ No newline at end of file +# Decorators + +decorator is a design pattern in Python that allows a user to add new functionality to an existing object without modifying its structure. Decorators are usually called before the definition of a function you want to decorate. + +Free Content +Python Decorators +Decorators in Python diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/103-lambdas.md b/content/roadmaps/107-python/content/102-python-advanced-topics/103-lambdas.md index 7a387ef1f..2930aa6df 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/103-lambdas.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/103-lambdas.md @@ -1 +1,8 @@ -# Lambdas \ No newline at end of file +# Lambdas + +Python Lambda Functions are anonymous function means that the function is without a name. As we already know that the def keyword is used to define a normal function in Python. Similarly, the lambda keyword is used to define an anonymous function in Python. + +Free Content +Python Lambda Functions +Lambdas in Python + diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/104-iterators.md b/content/roadmaps/107-python/content/102-python-advanced-topics/104-iterators.md index 6f3c03ad4..bd67752e6 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/104-iterators.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/104-iterators.md @@ -1 +1,7 @@ -# Iterators \ No newline at end of file +# Iterators + +An iterator is an object that contains a countable number of values. An iterator is an object that can be iterated upon, meaning that you can traverse through all the values. Technically, in Python, an iterator is an object which implements the iterator protocol, which consist of the methods __iter__() and __next__() . + +Free Content +Iterators in Python +Python Iterators diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/100-builtin-modules.md b/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/100-builtin-modules.md index ab78635e1..137c2b029 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/100-builtin-modules.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/100-builtin-modules.md @@ -1 +1,8 @@ -# Builtin modules \ No newline at end of file +# Builtin Modules + +Python interpreter has a number of built-in functions. They are always available for use in every interpreter session. Many of them have been discussed in previously. For example `print()` and `input()` for I/O, number conversion functions (`int()`, `float()`, `complex()`), data type conversions (`list()`, `tuple()`, `set()`) etc. + +Free Content +Python Modules +Python - Built-In Modules + diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/101-custom-modules.md b/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/101-custom-modules.md index bd623107f..37bb868ca 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/101-custom-modules.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/101-custom-modules.md @@ -1 +1,8 @@ -# Custom modules \ No newline at end of file +# Custom Modules + +Modules refer to a file containing Python statements and definitions. A file containing Python code, for example: `example.py`, is called a module, and its module name would be example. We use modules to break down large programs into small manageable and organized files. Furthermore, modules provide reusability of code. + +Free Content +Python Modules +Python Modules - Geeks for Geeks +Modules in Python diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/readme.md b/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/readme.md index 016d43441..fd264ec02 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/readme.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/105-modules/readme.md @@ -1 +1,8 @@ -# Modules \ No newline at end of file +# Modules + +Modules refer to a file containing Python statements and definitions. A file containing Python code, for example: `example.py`, is called a module, and its module name would be example. We use modules to break down large programs into small manageable and organized files. Furthermore, modules provide reusability of code. + +Free Content +Python Modules +Python Modules - Geeks for Geeks +Modules in Python diff --git a/content/roadmaps/107-python/content/102-python-advanced-topics/readme.md b/content/roadmaps/107-python/content/102-python-advanced-topics/readme.md index c4a4343df..2ceb7d585 100644 --- a/content/roadmaps/107-python/content/102-python-advanced-topics/readme.md +++ b/content/roadmaps/107-python/content/102-python-advanced-topics/readme.md @@ -1 +1,3 @@ -# Python advanced topics \ No newline at end of file +# Advanced Topics + +Now that you have covered the basics of Python, let's move on to some advanced topics. In this section, you will be learning about things like OOP, Lambdas, Decorators, Iterators, Modules, and more.