User:Simon/Trim4/tools/Python read file: Difference between revisions
< User:Simon | Trim4/tools
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
print(txt_content)</nowiki> | print(txt_content)</nowiki> | ||
Revision as of 11:09, 26 May 2020
Reading files
For Python to read a file:
with open('README.md', 'r') as txt: txt_content = txt.read() print(txt_content)