Add list comrpehensions, paradigms and expressions

pull/3210/head
Kamran Ahmed 2 years ago
parent f127d9a591
commit 9614eb2dc2
  1. 3
      content/roadmaps/108-python/content-paths.json
  2. 7
      content/roadmaps/108-python/content/102-python-advanced-topics/106-list-comprehensions.md
  3. 11
      content/roadmaps/108-python/content/102-python-advanced-topics/107-generator-expressions.md
  4. 13
      content/roadmaps/108-python/content/102-python-advanced-topics/108-paradigms.md
  5. 3813
      public/project/python.json

@ -26,6 +26,9 @@
"python-advanced-topics:modules": "/roadmaps/108-python/content/102-python-advanced-topics/105-modules/readme.md", "python-advanced-topics:modules": "/roadmaps/108-python/content/102-python-advanced-topics/105-modules/readme.md",
"python-advanced-topics:modules:builtin-modules": "/roadmaps/108-python/content/102-python-advanced-topics/105-modules/100-builtin-modules.md", "python-advanced-topics:modules:builtin-modules": "/roadmaps/108-python/content/102-python-advanced-topics/105-modules/100-builtin-modules.md",
"python-advanced-topics:modules:custom-modules": "/roadmaps/108-python/content/102-python-advanced-topics/105-modules/101-custom-modules.md", "python-advanced-topics:modules:custom-modules": "/roadmaps/108-python/content/102-python-advanced-topics/105-modules/101-custom-modules.md",
"python-advanced-topics:list-comprehensions": "/roadmaps/108-python/content/102-python-advanced-topics/106-list-comprehensions.md",
"python-advanced-topics:generator-expressions": "/roadmaps/108-python/content/102-python-advanced-topics/107-generator-expressions.md",
"python-advanced-topics:paradigms": "/roadmaps/108-python/content/102-python-advanced-topics/108-paradigms.md",
"version-control-systems": "/roadmaps/108-python/content/103-version-control-systems/readme.md", "version-control-systems": "/roadmaps/108-python/content/103-version-control-systems/readme.md",
"version-control-systems:basic-git-usage": "/roadmaps/108-python/content/103-version-control-systems/100-basic-git-usage.md", "version-control-systems:basic-git-usage": "/roadmaps/108-python/content/103-version-control-systems/100-basic-git-usage.md",
"repo-hosting-services": "/roadmaps/108-python/content/104-repo-hosting-services/readme.md", "repo-hosting-services": "/roadmaps/108-python/content/104-repo-hosting-services/readme.md",

@ -0,0 +1,7 @@
# List Comprehensions
List comprehensions are a concise way to create a list using a single line of code in Python. They are a powerful tool for creating and manipulating lists, and they can be used to simplify and shorten code.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.w3schools.com/python/python_lists_comprehension.asp'>Python - List Comprehension</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions'>Python List Comprehensions</BadgeLink>

@ -0,0 +1,11 @@
# Generator Compressions
Generator comprehensions are a concise way to create a generator using a single line of code in Python. They are similar to list comprehensions, but instead of creating a list, they create a generator object that produces the values on-demand, as they are needed.
Generator comprehensions are a useful tool for creating generators that generate a large sequence of values, as they allow you to create the generator without creating the entire sequence in memory at once. This can be more efficient and use less memory, especially for large sequences.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.pythontutorial.net/advanced-python/python-generator-expressions/'>Python Generator Expressions</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://djangostars.com/blog/list-comprehensions-and-generator-expressions/'>List Comprehensions in Python and Generator Expressions</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/generator-expressions/'>Python | Generator Expressions</BadgeLink>

@ -0,0 +1,13 @@
# Python Paradigms
Python is a multi-paradigm programming language, which means that it supports several programming paradigms. Some of the main paradigms supported by Python are:
- Imperative programming: This paradigm focuses on telling the computer what to do, step by step. Python supports imperative programming with features such as variables, loops, and control structures.
- Object-oriented programming (OOP): This paradigm is based on the idea of objects and their interactions. Python supports OOP with features such as classes, inheritance, and polymorphism.
- Functional programming: This paradigm is based on the idea of functions as first-class citizens, and it emphasizes the use of pure functions and immutable data. Python supports functional programming with features such as higher-order functions, lambda expressions, and generators.
- Aspect-oriented programming: This paradigm is based on the idea of separating cross-cutting concerns from the main functionality of a program. Python does not have built-in support for aspect-oriented programming, but it can be achieved using libraries or language extensions.
Python's support for multiple paradigms makes it a versatile and flexible language, and it allows developers to choose the paradigm that best fits their needs.
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.geeksforgeeks.org/programming-paradigms-in-python/'>Programming Paradigms in Python</BadgeLink>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save