Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren0
In this example is the ".txt" supposed to be referenced as the type of file, so we should replace it with with png, PDF, etc.?
4 Antworten
+ 2
Correct. However, you may need special methods to read files other than plaintext.
+ 1
We are not really sure which example you're talking about, since the Q&A does not link back to the lesson slides. Can you elaborate on your question? Is this about reading from text files?
+ 1
For example in open("filename.txt"), the .txt part is referring to the extension of a file correct?
0
Yep. You can't just open a pdf as plaintext.
https://stackoverflow.com/questions/9951427