JMJohn Maininblog.pynerds.com·Apr 7, 2024 · 4 min readname_ variable in PythonIn this article we will explore the __name__ variable, its purpose and how we can use it to tell where a module or script is being executed from. You may have come along the __name__ variable when going through some code, scripts or modules. The fol...00
JMJohn Maininblog.pynerds.com·Mar 28, 2024 · 5 min read*args and **kwargs in PythonIn this article you will learn how to use the single and double asterisk operators, to define functions that can take an arbitrary number of arguments. But before we dive on that, we first need to understand how arguments works in Python. There are ...00
JMJohn Maininblog.pynerds.com·Mar 28, 2024 · 5 min readUnderstand List comprehension in Pythonlist comprehension in Python-original article List comprehension is a type of syntax for quickly and conveniently creating lists and other sequences from a collection of elements. The syntax combines the features of loops, conditional execution and s...00
JMJohn Maininblog.pynerds.com·Mar 20, 2024 · 7 min readHow to use asyncio in PythonOriginal Article asyncio is a module that provides tools for implementing asynchronous programming. It was introduced in Python 3.3 and has since become a popular choice for creating and managing asynchronous tasks. The module is available in the s...00
JMJohn Maininblog.pynerds.com·Mar 20, 2024 · 7 min readPython functools moduleOriginal Article The functools module in the standard library provides functions and classes for manipulating functions. The primary tool defined in the module is the partial class, which as we will see in a while, allows the partial application of ...00