Most Popular Deep Learning Frameworks in 2021
It is difficult to determine which is the best among deep learning frameworks because each has its own strengths in different scenarios. However, it is quite possible to know which deep learning frameworks are trendy and…
Python zip() function examples
This article is about the zip() function in Python 3. Overview zip() is a built-in function of Python that works like a zipper. It can take zero, one, or many iterables (lists, tuples, dictionaries, etc), aggregates…
Python reduce() function examples
In this article, you will learn about the syntax and walk through 3 examples of the reduce() function in Python. Overview To use the reduce() function, you need to import it from the functools module as…
Python filter() function examples
In this article, we will cover the fundamental of the filter() function in Python and explore 4 practical examples of using it. Overview Syntax: Paramerters: function: The function that tests whether each item of an iterable…
Examples of using map() function in Python 3
In this article, we’ll go over a few examples of using the map() function in Python 3. Overview Syntax: function: The function to execute for each item iterables: one or many iterables (lists, tuples, etc). The…
Examples of using Lambda Functions in Python 3
A lambda function in Python is a small anonymous function that is defined by using the lambda keyword, like this: A lambda function can take unlimited number of arguments but it is syntactically restricted to a…
VS Code: How to comment out a block of Python code
To comment out a line of code in Python, you can add a # before that line. So how to comment out a block of code in Python? If you have worked with some other programming…
Examples of numpy.linspace() in Python
The numpy.linspace() function returns an ndarray with equally spaced intervals between the start and stop values. That ndarray is a vector space, also known as a linear space. That’s why the function is named linspace. This…
Extract all links from a webpage using Python and Beautiful Soup 4
This article shows you how to get all links from a webpage using Python 3, the Requests module, and the Beautiful Soup 4 module. For the demonstration purpose, I will scrape and extract the main page…
Most popular String methods in Python
Python provides a lot of methods that help programmers easily and quickly modify and manipulate strings. Learning all of these methods by heart is a hard job that takes much time and effort, and you may…
Python3.9 malloc error: can’t allocate region
Problem When running Python code that imports some modules (request, numpy, pandas, etc), I fall into the following error: This happens with both global and virtual environment. More error messages: My environment: Solution If you run…
Python program to count lower case letters in a string
To check if a letter is lower case or not in Python, we can use the islower() method. Combine it with a for loop, we can easily count the number of lower case letters in a…