12345678910111213141516171819 |
- import base64
- def convert_base64_string_to_object(base64_string):
- bytes = base64.b64decode(base64_string)
- string = bytes.decode("ascii")
- # return json.loads(string)
- return string
- if __name__ == "__main__":
- # Prompt the user for a base64 string
- user_input = input("Enter a base64 encoded string: ")
- # Call the function with the user's input
- result = convert_base64_string_to_object(user_input)
- # Print the result
- print("Decoded string:", result)
|