Skip to content

How to reference a file in Python?

with open("filename.txt","r") as f:
    contents = f.read()
See also  Python code snippet - How to check opencv version ?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.