Okay, so the jason file has yet to be translated; I'll work on that.
What about:
What about:
with open ('df.jason', 'r') as f: content = f.read() temp = content.split(',') for item in temp: if 'amount' in item: amount = item.strip() elif 'email' in item: email = item.strip() elif 'mobile' in item: mobile = item.strip() elif 'accountOwner' in item: accountOwner = item.strip() print(amount,email,mobile,accountOwner)
Output:"amount":300 "email":"[email protected]" "mobile":"100000012457" "accountOwner":"Tom Hank"
Sig:
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein