I tried to decode the utf-8 string which I encoded successfully but can't figure out how to decode it... Actually it's decoded very well, but I just want to concatenate it with like:
b = base64.b64decode(a).decode("utf-8", "ignore")
print('Decoding:'+b)
as I did in by doing encoding
a = str(base64.b64encode(bytes('hasni zinda ha u are my man boy yes u are ', "utf-8")))
print('Encoding :'+a)
Whenever i try to do it in the way which i want it gives me the error about :
File "C:/Users/…/python/first.py", line 8, in <module>
b = base64.b64decode(a).decode("utf-8", "ignore")
File "C:\Users\…\AppData\Local\Programs\Python\Python36-32\lib\base64.py", line 87, in b64decode
return binascii.a2b_base64(s) binascii.Error: Incorrect padding
Can anyone please help me to resolve it?