parent
c3812d17d5
commit
00a8b7995b
12 changed files with 97 additions and 12 deletions
@ -1 +1,14 @@ |
||||
# Methods dunder |
||||
# 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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.tutorialspoint.com/difference-between-method-and-function-in-python'>Method vs Function in Python</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/dunder-magic-methods-python/'>Dunder or magic methods in Python</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.tutorialsteacher.com/python/magic-methods-in-python'>Python - Magic or Dunder Methods</BadgeLink> |
||||
|
||||
|
@ -1 +1,8 @@ |
||||
# Inheritance |
||||
|
||||
Inheritance allows us to define a class that inherits all the methods and properties from another class. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.w3schools.com/python/python_inheritance.asp'>Python Inheritance</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.javatpoint.com/inheritance-in-python'>Inheritance in Python</BadgeLink> |
||||
|
||||
|
@ -1 +1,9 @@ |
||||
# 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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='blue' badgeText='Official Docs' href='https://docs.python.org/3/tutorial/classes.html'>Classes in Python</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/python-classes-and-objects/'>Python Classes and Objects</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.w3schools.com/python/python_classes.asp'>Python Classes and Objects</BadgeLink> |
||||
|
||||
|
@ -1 +1,8 @@ |
||||
# Oop |
||||
# 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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://realpython.com/python3-object-oriented-programming/'>Object Oriented Programming in Python</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/python-oops-concepts/'>Python OOP Concepts</BadgeLink> |
||||
|
||||
|
@ -1 +1,9 @@ |
||||
# Regular expressions |
||||
# 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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='blue' badgeText='Official Reference' href='https://docs.python.org/3/library/re.html'>Regular Expressions in Python</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developers.google.com/edu/python/regular-expressions'>Python Regular Expressions</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='read' href='https://www.tutorialspoint.com/python/python_reg_expressions.htm'>Python - Regular Expressions</BadgeLink> |
||||
|
||||
|
@ -1 +1,7 @@ |
||||
# 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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.datacamp.com/tutorial/decorators-python'>Python Decorators</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/decorators-in-python/'>Decorators in Python</BadgeLink> |
||||
|
@ -1 +1,8 @@ |
||||
# 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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/python-lambda-anonymous-functions-filter-map-reduce/'>Python Lambda Functions</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.w3schools.com/python/python_lambda.asp'>Lambdas in Python</BadgeLink> |
||||
|
||||
|
@ -1 +1,7 @@ |
||||
# 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__() . |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.w3schools.com/python/python_iterators.asp'>Iterators in Python</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/iterators-in-python/'>Python Iterators</BadgeLink> |
||||
|
@ -1 +1,8 @@ |
||||
# Builtin modules |
||||
# 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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.digitalocean.com/community/tutorials/python-modules'>Python Modules</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.knowledgehut.com/tutorials/python-tutorial/python-built-in-modules'>Python - Built-In Modules</BadgeLink> |
||||
|
||||
|
@ -1 +1,8 @@ |
||||
# Custom modules |
||||
# 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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='blue' badgeText='Official Reference' href='https://docs.python.org/3/tutorial/modules.html'>Python Modules</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/python-modules/'>Python Modules - Geeks for Geeks</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.programiz.com/python-programming/modules'>Modules in Python</BadgeLink> |
||||
|
@ -1 +1,8 @@ |
||||
# 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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='blue' badgeText='Official Reference' href='https://docs.python.org/3/tutorial/modules.html'>Python Modules</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/python-modules/'>Python Modules - Geeks for Geeks</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.programiz.com/python-programming/modules'>Modules in Python</BadgeLink> |
||||
|
@ -1 +1,3 @@ |
||||
# Python advanced topics |
||||
# 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. |
||||
|
Loading…
Reference in new issue