Python Print Function [And Its SECRET Separator & End Arguments]

Everybody knows the print function in Python. It prints a string to the shell–and makes the computation of a Python program explicit to the programmer. But only few coders understand its powerful arguments to format the output. What are they? There are two little-used arguments of the print function in Python. The argument sep indicates …

Python Print Function [And Its SECRET Separator & End Arguments] Read More »

Best YouTube Channel Python

[Top 6] What’s the Best YouTube Channel to Learn Python? Channel #1 Will Surprise You

YouTube is a great way of learning Python. But those channels top all others. In this article, you’ll find a list of the top YouTube Channels — in reverse order! Table of Contents Corey Schäfer #6Clever Programmer #5Real Python #4CS Dojo #3Socratia #2Sentdex #1The Finxter Channel Corey Schäfer #6 Channel link: https://www.youtube.com/user/schafer5/ 37,444,096 channel views …

[Top 6] What’s the Best YouTube Channel to Learn Python? Channel #1 Will Surprise You Read More »

Does the Dot Regex (.) Match Whitespace Characters in Python?

Yes, the dot regex matches whitespace characters when using Python’s re module. Consider the following example: Try it yourself in our interactive Python shell (click “run”): The dot matches all characters in the string–including whitespaces. You can see that there are many whitespace characters ‘ ‘ among the matched characters. Need more info? Watch the …

Does the Dot Regex (.) Match Whitespace Characters in Python? Read More »

How to Add an Element to a Python List at an Index?

To add an element to a given Python list, you can use either of the three following methods: Use the list insert method list.insert(index, element). Use slice assignment lst[index:index] = [element] to overwrite the empty slice with a list of one element. Use list concatenation with slicing lst[:2] + [‘Alice’] + lst[2:] to create a …

How to Add an Element to a Python List at an Index? Read More »

Google’s FooBar Challenge | See How I Passed Levels 1 to 5 in Real-Time

I just got invited to perform Google’s FooBar challenge. In this article, I want to share with you how I solved the problems in real-time. The purpose of this article is to educate you—and to have some fun. So, are you ready? Table of Contents Level 1: Prime NumbersLevel 2 Challenge 1: Sequence SumLevel 2 …

Google’s FooBar Challenge | See How I Passed Levels 1 to 5 in Real-Time Read More »

Photo by Gensa Hub on Unsplash

Matplotlib Animation – A Helpful Illustrated Guide

Creating animations in matplotlib is reasonably straightforward. However, it can be tricky when starting, and there is no consensus for the best way to create them. In this article, I show you a few methods you can use to make amazing animations in matplotlib. Table of Contents Matplotlib Animation ExampleMatplotlib Animation SaveMatplotlib Animation Save Mp4Matplotlib …

Matplotlib Animation – A Helpful Illustrated Guide Read More »