User:Simon/Trim4/tools/Python read file

From XPUB & Lens-Based wiki
< User:Simon‎ | Trim4/tools
Revision as of 17:27, 15 November 2019 by Simon (talk | contribs)

Reading files

For Python to read a file:

with open('README.md', 'r') as txt: 

    txt_content = txt.read() 


print(txt_content)