from bs4 import BeautifulSoup
table_data = [[cell.text for cell in row("td")] for row in BeautifulSoup(html_data)("tr")]
import json
print json.dumps(dict(table_data))
from collections import OrderedDict
import json
print json.dumps(OrderedDict(table_data))
# Нихт-нихт, не делайте так
f = open("bar.txt")
s = list(f1.readlines())
for i in s:
print i
# Я, я, зис ис гуд
f = open("foo.txt")
for l in f:
print s