Python Posts

How to Get File Size in Python in Bytes, KB, MB, and GB Cover Image

How to Get File Size in Python in Bytes, KB, MB, and GB

When working with files programmatically, you’ll often want to know how large a file is. This can be helpful when transferring files or copying files. Python provides a number of built-in methods of doing this, including using the os and pathlib libraries. Depending on your preference, either of these approaches works well. By the end

How to Get File Size in Python in Bytes, KB, MB, and GB Read More »

How to fix Python AttributeError 'dict' object has no attribute 'append' Cover Image

How to Fix: Python AttributeError: ‘dict’ object has no attribute ‘append’

The Python AttributeError is a common one that can mean different things. In this tutorial, you’ll learn how to solve the Python AttributeError: ‘dict’ object has no attribute ‘append’ error. The solution to the error can be interpreted in different ways. This tutorial will guide you through various causes of the error as well as

How to Fix: Python AttributeError: ‘dict’ object has no attribute ‘append’ Read More »

Python Scientific Notation Converting and Suppressing Cover Image

Python Scientific Notation: Converting and Suppressing

Python allows you to work with floating point values in standard notations and scientific notation. In this tutorial, you’ll learn how to use scientific notation to convert and suppress floating point values to and from scientific notation. Scientific notation refers to numbers being expressed in the power of 10. By the end of this tutorial,

Python Scientific Notation: Converting and Suppressing Read More »

How to fix Python SyntaxError - EOL while scanning string literal Cover Image

How to Fix: Python SyntaxError – EOL while scanning string literal

In this tutorial, you’ll learn how to fix one of the most common Python errors: SyntaxError – EOL while scanning string literal. There are three main causes for this error and this tutorial will help you resolve each of these causes. SyntaxErrors are indicative of errors with your code’s syntax. Since your code’s syntax is

How to Fix: Python SyntaxError – EOL while scanning string literal Read More »