Codeigo

Just programming

Skip to content
  • Python
  • PowerShell
  • About Me

Remove Unicode Characters in Python

What are Unicode Characters?

Character encoding, in simple terms, is a process of translating characters into integers or sequences of bits. Any character we can write has a corresponding representation in Unicode that is universally accepted across different languages.

Continue reading →
This entry was posted in Python on June 17, 2022 by Kiprono Koech.

Write New Line to a File in Python

A Quick Answer

In Python, one can write a new line into a file using either of the following methods:

Continue reading →
This entry was posted in Python on June 13, 2022 by Kiprono Koech.

Set List Size in Python

Suppose you want to create a Python list of the predefined length? And suppose you want to create a list of lists with a certain size? Let’s find out what we can do in Python.

Continue reading →
This entry was posted in Python on June 13, 2022 by Kiprono Koech.

Check if Json Object Has Empty Value in Python

JSON is a data format available across platforms allowing the interchange of data in human-readable form. It stands for JavaScript Object Notation (JSON).

Python has a library called “json” that is used when working with JSON. JSON format works just like Python Dictionary except for the following value conversions:

Continue reading →
This entry was posted in Python on June 10, 2022 by Kiprono Koech.

NameError name ‘requests’ is not defined in Python

NameError can occur for two reasons: we are trying to use the “requests” package before importing it, or the word “requests” is used as an identifier before being refined.

Continue reading →
This entry was posted in Python on June 10, 2022 by Kiprono Koech.

Call Python Script From Bash With Arguments

Python scripts can be executed in different ways. The common way includes using JuPyter Notebook, IDE, and even text editors. This article focuses on running the code on the command line, specifically the cases we have to pass arguments.

Continue reading →
This entry was posted in Python on June 10, 2022 by Kiprono Koech.

Get the Previous Month or Day in Python

This article will discuss best practices for parsing dates and getting a specific month, day, or year in the past or the future.

Continue reading →
This entry was posted in Python on May 26, 2022 by Kiprono Koech.

Python Class Object Is Not Callable

A callable object in Python is an object that can be called – explicitly initiated to execute. If we attempt to call a not callable function, we run into this kind TypeError message.

Continue reading →
This entry was posted in Python on May 17, 2022 by Kiprono Koech.

Replace Single Quotes With Double Quotes in Python

In Python, strings are enclosed with single or double-quotes. Single quotes can be replaced with double quotation marks and vice versa in Python using any of the following methods:

Continue reading →
This entry was posted in Python on May 17, 2022 by Kiprono Koech.

Convert HEX to RGB and HSV in Python

The three-color models are RGB, HSV, and HEX. RGB stands for Red, Green, and Blue. HSV stands for Hue, Saturation, and Value. HEX is a hexadecimal representation of RGB values.

Continue reading →
This entry was posted in Python on May 10, 2022 by Kiprono Koech.

Post navigation

← Older posts

Recent Posts

  • Remove Unicode Characters in Python
  • Write New Line to a File in Python
  • Set List Size in Python
  • Check if Json Object Has Empty Value in Python
  • NameError name ‘requests’ is not defined in Python
Proudly powered by WordPress