I\'m trying to read in a string representation of a Tuple from a file, and add the tuple to a list. Here\'s the relevant code.
raw_data = userfile.read().spl
Use eval() instead of ast.literal_eval() if the input is trusted (which it is in your case).
eval()
ast.literal_eval()
raw_data = userfile.read().split('\n') for a in raw_data : print a btc_history.append(eval(a))
This works for me in Python 3.6.0