'SImon cipher in CBC mode using Python

I want to implement CBC mode in Simon Cipher and i also have put the initialization vector. My problem is why the decryption output give the wrong result. The output shows that the encrypted message and decrypted message give almost same result.

ciphertext (hex): 0x318e8458049de850c85afb1e05d737b1

Plaintext (hex) : 0x318e8458049de850c85afb1e05d7339b

This is my code. Is there any recommended solution for my problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source