How to make a Dictionary a integer

is it possible to make dictionary back into a integer
here is my dictionary

 keys_and_output = {
            'output': output,
            'nkey': nkey,
            'okey': okey
        }
1 Like

What would you actually like to see as the result? If it’s difficult to do in English, you might give examples by writing test code, for example:

assert dict_to_int({'output': 'abc', 'nkey': 'def', 'okey': 'ghi'}) == 0x0A0B0C0D0E0F101112

Without some kind of notion what it means to you to convert a dictionary to an int, it will be difficult to respond to your posts.

1 Like

here is my entire program

class encoder:
    def numbers_encoder(Numbers):
        import random
        import get_keys
        output=Numbers
        from count import number_counter
        range_finder = number_counter(Numbers)
        Key_rand = random.randrange(1, 1000)
        for i in range(range_finder):
            output = output*Key_rand
        nkey = range_finder
        okey = Key_rand
        keys_and_output = {
            output,
            nkey,
            okey
        }
        return keys_and_output
    def letters(letters):
        import random
        from count import letter_counter
        import first_letter_of_word
        disco_party= letter_counter(letters)
        rand = random.randrange(1, 1000)
        on_broadway=first_letter_of_word.letter_of_a_word(letters)
        for i in range(disco_party):
            num = on_broadway*rand
        return num
        key1 = disco_party
        key2 = rand
        key3 = on_broadway
class decoder:        
    def numbers_decoder(encrypted_number, okey, nkey):
        for i in range(nkey):
            output= encrypted_number/okey
        return output

and this is the output

import Pycrypt
output = Pycrypt.encoder.numbers_encoder(123123)
encoded_num = f"output: {output['output']}"
nkey = f"output: {output['nkey']}"
okey = f"output: {output[okey]}"
print(Pycrypt.decoder.numbers_decoder(encoded_num, okey, nkey))

This code does not run as is. I can’t tell what you’re trying to do.