Python

Image To Base64 Conversion In Python

Python provides several modules to work with images and encode them in base64 format. One of the most commonly used modules is the Pillow module, an updated version of the Python Imaging Library .To convert an image to base64 format in Python. import base64 def img_to_bs64(image_path): with open(img_path, “rb”) as img_file: return base64.b64encode(img_file.read()).decode(‘utf-8’) img_path = …

Image To Base64 Conversion In Python Read More »

Collection in Python with examples

In python, collections are the containers used for storing the data. The built-in data structures in python are tuples, lists, sets and dictionaries. The collections class will provide additional data structures apart from the built-in data structures. Some of the data structures in the ‘collections’ module − Counter Named tuple ordered   from collections import …

Collection in Python with examples Read More »

How to print all the alphabetical pattern drawing using Python

In this tutorial, We can Create alphabetical patterns using  Python. They can be done using loops and conditionals.Drawing alphabetical patterns in Python can be accomplished in various ways, depending on the specific pattern you want to create. Here we can learn simply logic to create various patterns.You might be checking for the input tricks but …

How to print all the alphabetical pattern drawing using Python Read More »

Scroll to Top