import base64
# encoding
text = 'Python'
encoded_text = base64. b64encode(text.encode())
# decoding
another_text = b'UHl0aG9u'
decoded_another_text = base64.b64decode(another_text.decode())
print(encoded_text)
print(decoded_another_text)
Pythonda ma'lumotlarni encode hamda decode qilish
# encoding
text = 'Python'
encoded_text = base64. b64encode(text.encode())
# decoding
another_text = b'UHl0aG9u'
decoded_another_text = base64.b64decode(another_text.decode())
print(encoded_text)
print(decoded_another_text)
Pythonda ma'lumotlarni encode hamda decode qilish