LaughingMan
LaughingMan

Reputation: 650

python library 'json' prints everything twice

I decided to make a very simple program to get started with json in Python 3.4.3

However, it seemed I only write two lines before I encountered something weird; it prints everything twice. The program is just this:

import json

jsonFile = open('TODO.json','r').read()
print(jsonFile)

This prints the string twice. If I remove the 'import json' it works just fine. Any suggestions?

Thanks in advance

Upvotes: 4

Views: 853

Answers (1)

LaughingMan
LaughingMan

Reputation: 650

Okay, so I named py file json.py. Did not think that through

Upvotes: 5

Related Questions