#!/usr/bin/env python3
import ast
filename = 'file.txt'
# open file
with open(filename) as f:
# read lines one by one
for line in f:
# remove semicolon and new line characters from the end of the line
line = line.rstrip('\n;')
# parse string
data = ast.literal_eval(line)
# print representation of the data
print(repr(data))