Base64 encoding in Python

Introduction Today, we are going to talk about base64 encoding in Python. Understanding how characters are represented is very important to make sense of base64. For beginners, I highly recommend that you check the following article. It explains how Python handles Unicode and string data types. Let us get started… What is base64 encoding? Base64

Python read json file to dictionary

Introduction In this code snippet, we are going to demonstrate how to read JSON data from file into a Python dictionary data structure. String to JSON The function json.loads() can be used to load JSON data from string to dictionary. To load the data from file, we need to convert the file to string. Let

Converting a list of lists to json in Python

Introduction JSON (Java Script Object Notation) is one of the most popular text formats on the web due to its simplicity, lightweight and adoption. It is used to structure data exchange between web services. You may check the following article for implementing a simple web service using Python. JSON is a subset of the JavaScript

iOS real device test automation tutorial using Appium and Python

Appium for iOS In this post, we are going to explain the necessary steps required to implement a basic iOS simulator and real device based test automation using Appium and Python. I assume that the reader is familiar with the following... Mac OS basics iOS basics (ex. Xcode, singing certificates, etc) Appium automation framework Python

Python insert list into list at index

Introduction This is a frequently asked question in Python despite its simplicity. In the code snippets below, we will provide straightforward examples to demonstrate how to embed a list within another list at the beginning, middle and end. Let us start with the first case... Python insert list into list at beginning The list object

Python convert unicode to string

Introduction Unicode in Python is not a beginner level topic. To get a better understanding, proper introduction is required. For the sake of this post, we are only going to provide few code snippets to demonstrate the conversion of unicode to string and visa versa. For detailed information about Unicode in Python, it is recommended

Python write list to file

Introduction Saving data structures such as lists to permanent storage for later retrieval is a common practice in computer programming. This technique is commonly referred to as data serialization or marshaling. The goal is to translate data into a format suitable for storage or transmission over network. In today's code snippets article, we are going