Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open("in.txt")
- conversations = open("data/russian/conversations.json", "wb")
- ar = {"conversations": []}
- worker = []
- for line in f:
- if line == "-----":
- ar["conversations"].append(worker)
- worker = []
- else:
- worker.append(line)
- print ar["conversations"][0][0]
- conversations.write(str(ar))
- conversations.close()
Add Comment
Please, Sign In to add comment