Okay, so I have a tuple for a game, and this is it: ['Hondros', {'Equiped': [['none', [], 0], ['Rags', [0, 1, 0, 0], 1, 1], ['Mocassins', [0, 0, 1, 0], 1, 1], ['Gauntlets', [0, 0, 0, 1], 6, 5]], 'Equipment': [0, 1, 1, 1], 'Stats': {'AC': 14, 'Strength': 15, 'Constitution': 14, 'Level': 1, 'HP': 12, 'Experience': 0, 'Dexterity': 12, 'Intelligence': 12, 'Base AC': 8, 'Wisdom': 11, 'HP max': 12}, 'Inventory': [], 'Gold': 0}]
Anything inside it can change, including number of tuples inside the dictionaries. Anyways, this is how my program stores the character's information. There might be more added on. Now, this is what I want to do. I want to open a file, convert the tuple to a long integer, through use of the ord(). I've already done this, and saved it as character.sav, where character is the character's name. Now, when I open it, and convert it back, I now have a string of the above tuple. How do I go about reconverting it? Doing a tuple of it just makes it weird...
EDIT: Er... I seem to have my definitions of tuple and list confused... these are lists, not tuples. Oh well... same difference really