Terms Of Use

Privacy Policy

Featured snippets are MIT license

Gears & Masters

DevOpsnipp.com © 2020

medium.png

Read file content

Read file content using Python

6

Votes

FILE_PATH = "/home/ahmad/details.json"
f = open(FILE_PATH,'r')
data = f.read() # data var value is the file content
f.close()
print(data)

Vote Here

You must earn at least 1 vote on your snippets to be allowed to vote