Blog

Page 869 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Why is "1000000000000000 in range(1000000000000001)" so fast in Python 3?
performancepythonpython-3.xpython-internalsrange

Why is "1000000000000000 in range(1000000000000001)" so fast in Python 3?

Published on September 2, 2023

# Why is "1000000000000000 in range(1000000000000001)" so fast in Python 3? ๐Ÿš€ Do you ever wonder why checking if a super large number is in a range using Python's `range()` function is lightning fast? How is it possible that regardless of the number of d

Cover Image for How do I change the size of figures drawn with Matplotlib?
figsizematplotlibpythonseaborn

How do I change the size of figures drawn with Matplotlib?

Published on September 2, 2023

## ๐Ÿ“ How to Change the Size of Figures Drawn with Matplotlib ๐Ÿ–Œ๏ธ Are you tired of squinting at your tiny figures in Matplotlib? ๐Ÿค” Don't worry, we've got you covered! In this guide, we'll show you how to easily change the size of the figures you create u

Cover Image for How can I access environment variables in Python?
environment-variablespython

How can I access environment variables in Python?

Published on September 2, 2023

# ๐Ÿ How to Access Environment Variables in Python? So you want to access environment variables in Python? ๐Ÿค” No worries, I've got you covered! ๐Ÿ™Œ ## Understanding Environment Variables Before diving into how to access environment variables in Python, l

Cover Image for Manually raising (throwing) an exception in Python
exceptionpython

Manually raising (throwing) an exception in Python

Published on September 2, 2023

# ๐Ÿ Manually Raising Exceptions in Python: Mastering the Art ๐Ÿš€ Have you ever found yourself in a situation where you need to raise an exception in Python and catch it later using an `except` block? Fear not, fellow Pythonista! In this guide, we'll explo

Cover Image for Understanding Python super() with __init__() methods
classinheritanceooppythonsuper

Understanding Python super() with __init__() methods

Published on September 2, 2023

## Understanding Python `super()` with `__init__()` methods ๐Ÿ๐Ÿ‘จโ€๐Ÿ’ป Do you often find yourself confused when it comes to using `super()` in Python's `__init__()` methods? ๐Ÿค” Well, fear not! In this blog post, we'll dive deep into the world of `super()` a

Cover Image for How do I make a time delay?
delaypythonsleeptimedelay

How do I make a time delay?

Published on September 2, 2023

๐Ÿ•’๐Ÿ”งโฐ How do I make a time delay? Have you ever found yourself in a situation where you need to introduce a time delay in your Python script? Maybe you want to create a dramatic pause in your code, simulate real-time scenarios, or add a delay between spec

Cover Image for How do I check if a list is empty?
listpython

How do I check if a list is empty?

Published on September 2, 2023

<h2>๐Ÿ” How to Check if a List is Empty? ๐Ÿ”</h2> <p>Do you often find yourself struggling to determine whether a list in your code is empty or not? Don't worry, you're not alone! In this blog post, we'll explore the common issues surrounding this question

Cover Image for How do I clone a list so that it doesn"t change unexpectedly after assignment?
python

How do I clone a list so that it doesn"t change unexpectedly after assignment?

Published on September 2, 2023

# ๐Ÿ“ Tech Blog: The Art of Cloning Lists ๐Ÿงช๐Ÿ”ฌ Hey there, tech enthusiasts! ๐Ÿ‘‹ Are you tired of encountering unexpected changes when trying to clone a list? Fret not because we've got you covered! In this blog post, we'll dive deep into the world of list c

Cover Image for How do I concatenate two lists in Python?
concatenationlistpython

How do I concatenate two lists in Python?

Published on September 2, 2023

# How to Concatenate Two Lists in Python: A Quick and Easy Guide! ๐Ÿ๐Ÿ˜Ž So you want to concatenate two lists in Python? No worries, it's simpler than you think! In this guide, we'll cover everything you need to know about combining lists effortlessly. Whet

Blog | Matheus Mello