In Python, the yield keyword is used in a function to create a generator. Generators are a type of iterable that can produce a sequence of values, one at a time, instead of generating all the values at once. The yield keyword is what makes a function a generator function.
Tag: python
Apache Airflow | Write your first DAG in Apache Airflow
Apache Airflow is an open-source platform that allows developers to programmatically create, schedule, and monitor workflows as directed acyclic graphs (DAGs). With Airflow, you can define complex workflows with dependencies and execute them automatically or manually. In this article, we will guide you through the process of setting up Airflow and creating your first DAG.
Python | Introduction to Object Oriented Programming
Object-Oriented Programming (OOP) is a programming paradigm that has been used widely in software development. In Python, OOP is a popular approach used by developers to create robust, scalable, and maintainable software applications. In this article, we will explore the concept of OOP in Python, its benefits, and some examples.
Python | Exception Handling
Exception handling is an essential concept in programming that helps to handle and manage errors that occur during the execution of a program. Python provides a robust and easy-to-use exception handling mechanism that enables developers to identify and handle errors efficiently. In this article, we will explore the concept of exception handling in Python, its syntax, and some examples.
Python | File Handling
Python is a versatile and powerful programming language, with a vast range of features and libraries that make it a popular choice for a variety of tasks. One of its key strengths lies in its ability to handle file operations with ease. In this article, we’ll explore the basics of ‘.txt/csv/flat’ file operations in Python, including reading, writing, and manipulating files.
Python | How to import modules?
In Python, modules are an essential part of the language that allows you to reuse code, organize your code into separate files, and improve code modularity. There are two ways to import modules in Python:
1) using the import statement.
2) using the from keyword.
In this article, we’ll take a closer look at how to import modules in Python using both methods.
Top 5 Python Books for Beginners and Advanced Programmers
Python is one of the most widely used programming languages in the world, and its popularity is growing at a tremendous rate. Whether you are a beginner or an experienced programmer, learning Python can help you in your career or personal projects. In this article, we will discuss the top 5 best books for learning Python.
Python | Modules
In this article, we’ll take a closer look at what modules are, why they’re useful, and how you can use them in your Python projects. One of the key features that makes Python so powerful is its use of modules.
Python | Set Operations
In Python, Sets are a data structure that allows us to store unique values in an unordered collection. Set operations are a common way to perform various tasks with sets. In this article, we will discuss some of the most commonly used set operations in Python.
Python | Number functions
In Python, numbers are a fundamental data type and they can be used to perform various operations and calculations. Python provides several built-in functions that make it easier to work with numbers. In this article, we will discuss some of the most commonly used number functions in Python.