Skip to content

Python

Python String Contains Check if a String Contains a Substring Cover Image

Python String Contains: Check if a String Contains a Substring

In this tutorial, you’ll learn how to use Python to check if a string contains another substring. There are a number of ways to use Python to check a string for a substring, including case insensitivity, checking for patterns, and

Python setattr Function Explained Cover Image

Python setattr() Function Explained

In this tutorial, you’ll learn about the Python setattr() function, including what it does, when to use it, and when it’s redundant to use it. The function is used to set an attribute to a value of an object, whether

NumPy linspace Creating Evenly Spaced Arrays with np.linspace

NumPy linspace: Creating Evenly Spaced Arrays with np.linspace

In this tutorial, you’ll learn how to use the NumPy linspace function to create arrays of evenly spaced numbers. This can be incredibly helpful when you’re working with numerical applications. The NumPy linspace function allows you to create evenly spaced

NumPy logspace Understanding the np logspace Function Cover Image

NumPy logspace: Understanding the np.logspace() Function

In this tutorial, you’ll learn how to use the NumPy logspace function and how to use its different parameters. The np.logspace() function is used to return numbers that are evenly spaced on a log scale. The function allows you to

How to Check if a String is Empty in Python Cover Image

How to Check if a String is Empty in Python

In this tutorial, you’ll learn how to use Python to check if a string is empty or not. Being able to work with strings and see whether or not they are empty is an important skill to learn. Python strings

Python New Lines and How to Print Without Newline Cover image

Python New Line and How to Print Without Newline

In this tutorial, you’ll learn how to use the Python new line character and how to print without newlines. Being able to control how your program prints strings is an important skill, especially when working with text files or command-line

How to Iterate (Loop) Over a List in Python Cover Image

How to Iterate (Loop) Over a List in Python

In this tutorial, you’ll learn how to iterate (or loop) over a list in Python. You’ll learn how to iterate with for loops, while loops, comprehensions, and more. What’s more, is that you’ll learn when each of these methods is

Different Ways to Concatenate NumPy Arrays in Python Cover Image

Different Ways to Concatenate NumPy Arrays in Python

In this tutorial, you’ll learn how to concatenate NumPy arrays in Python. Knowing how to work with NumPy arrays is an important skill as you progress in data science in Python. Because NumPy arrays can be 1-dimensional or 2-dimensional, it’s

Python factorials cover image

Python Factorial Function: Find Factorials in Python

In this tutorial, you’ll learn how to calculate factorials in Python. Factorials can be incredibly helpful when determining combinations of values. In this tutorial, you’ll learn three different ways to calculate factorials in Python. We’ll start off with using the

How to Concatenate Strings in Python A Complete Guide Cover Image

How to Concatenate Strings in Python: A Complete Guide

In this tutorial, you’ll learn how to use Python to concatenate strings. Being able to work with strings in Python is an important skill in almost every program you’ll write. In some cases, you’ll want to display text in your

Python map Function Transforming Iterables without Loops Cover Image

Python map Function: Transforming Iterables without Loops

In this tutorial, you’ll learn how to use the built-in Python map() function. This function allows you to process and transform, or “map”, items in an iterable without needing to use a loop to iterate. The function allows you to

Numpy zeros matrix cover image

NumPy Zeros: Create Zero Arrays and Matrix in NumPy

In this tutorial, you’ll learn how to generate a zero matrix using the NumPy zeros function. Zero arrays and matrices have special purposes in machine learning. Being able to create them efficiently will allow you to become more capable in