chore: sync content to repo (#9567)

Co-authored-by: kamranahmedse <4921183+kamranahmedse@users.noreply.github.com>
This commit is contained in:
github-actions[bot]andkamranahmedse authored and GitHub committed 2026-01-27 14:52:04 +01:00
1 parent 2d08c8b51d
commit 5082a7f72d
5 files changed
+38 -3

No files matched your search

@@ -5,4 +5,5 @@ In Python, a dictionary is a built-in data type that allows you to store key-val
Visit the following resources to learn more:
- [@official@Dictionaries in Python](https://docs.python.org/3/tutorial/datastructures.html#dictionaries)
- [@article@Dictionaries in Python](https://realpython.com/python-dicts/)
- [@article@Dictionaries in Python](https://realpython.com/python-dicts/)
- [@article@Hashmaps in Python: Master Implementation and Use Cases](https://roadmap.sh/python/hashmap)
@@ -0,0 +1,10 @@
# Encapsulation
Encapsulation is a way to bundle data (attributes) and the methods that operate on that data into a single unit, known as a class. It restricts direct access to some of the object's components and prevents the accidental modification of data. This is achieved by declaring some attributes or methods as private, meaning they can only be accessed from within the class itself.
Visit the following resources to learn more:
- [@article@Encapsulation in Python: All You Need to Know](https://roadmap.sh/python/encapsulation)
- [@article@Encapsulation in Python: A Comprehensive Guide](https://www.datacamp.com/tutorial/encapsulation-in-python-object-oriented-programming)
- [@article@Encapsulation](https://programming-25.mooc.fi/part-9/3-encapsulation)
- [@video@Encapsulation - Advanced Python Tutorial #5](https://www.youtube.com/watch?v=dzmYoSzL8ok)
@@ -1,9 +1,10 @@
# Hash Tables
# HashMaps
Hash Table, Map, HashMap, Dictionary or Associative are all the names of the same data structure. It is a data structure that implements a set abstract data type, a structure that can map keys to values.
HashMap, HashTable, Map, Dictionary, or Associative are all the names of the same data structure. It is a data structure that implements a set abstract data type, a structure that can map keys to values.
Visit the following resources to learn more:
- [@article@Hashmaps in Python: Master Implementation and Use Cases](https://roadmap.sh/python/hashmap)
- [@article@Build a Hash Table in Python](https://realpython.com/python-hash-table/)
- [@article@Hash Tables and Hashmaps in Python](https://www.edureka.co/blog/hash-tables-and-hashmaps-in-python/)
- [@video@Hash Table Data Structure | Illustrated Data Structures](https://www.youtube.com/watch?v=jalSiaIi8j4)
@@ -0,0 +1,13 @@
# 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 that have 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.
Visit the following resources to learn more:
- [@article@Method vs Function in Python](https://www.tutorialspoint.com/difference-between-method-and-function-in-python)
- [@article@Python - Magic or Dunder Methods](https://www.tutorialsteacher.com/python/magic-methods-in-python)
@@ -0,0 +1,10 @@
# Variable Scope
Variable scope refers to the region of a program where a particular variable can be accessed. It determines the visibility and lifetime of a variable. Understanding scope is crucial for avoiding naming conflicts and ensuring that variables are used correctly within different parts of your code.
Visit the following resources to learn more:
- [@article@Python Nonlocal Keyword Explained by Our Experts](https://roadmap.sh/python/nonlocal)
- [@article@Python Variable Scope And The LEGB Rule Explained](https://www.datacamp.com/tutorial/scope-of-variables-python)
- [@article@Python Scope](https://www.w3schools.com/python/python_scope.asp)
- [@video@Python Tutorial: Variable Scope - Understanding the LEGB rule and global/nonlocal statements](https://www.youtube.com/watch?v=QVdf0LgmICw)