You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Description: Simple example how to encode and decode strings in Python
# Environment: PyCharm and Anaconda environment
#
# MIT License
# Copyright (c) 2018 Valentyn N Sichkar
# github.com/sichkar-valentyn
#
# Reference to:
# [1] Valentyn N Sichkar. Simple example how to encode and decode strings in Python // GitHub platform [Electronic resource]. URL: https://github.com/sichkar-valentyn/Encoding_Decoding_in_Python (date of access: XX.XX.XXXX)
# Method encode() returns an encoded version of the string
initial_string = 'Hello there!'
encoded_string = initial_string.encode('utf-32')
# To choose the right Codec for needed language go to the page:
# docs.python.org/3.7/library/codecs.html
# Or choose 'utf-32' as standard for all languages
print('Encoded string of "', initial_string, '" is: ')