I have a file myfile.txt.
hello
And I have the following script:
#!/usr/bin/python
import markdown
f = open('myfile.txt', 'r')
f.read()
htmlmarkdown=markdown.markdown(f)
I got the:
AttributeError: ‘file’ object has no attribute ‘strip’
What I should do to make a success?
Try this: