Least Significant Bit (LSB) is a technique in which the last bit of each pixel is modified and replaced with the data bit. This method only works on Lossless-compression images, which means that the files are stored in a compressed format.
For Python Implementation
You can use OpenCV to manipulate the images.
pip3 install opencv-python numpy
Open up a new Python file and follow along:
import numpy as np
As you have to follow a few steps, I would suggest you go through this: https://www.thepythoncode.com/article/hide-secret-data-in-images-using-steganography-python