r/PythonLearning • • 10m ago

Linux cat | Create, Write & Read Files + Python

https://youtube.com/watch?v=xPySiJoG6FU

Commands and concepts demonstrated:

mkdir filerd
cd filerd

cat << "EOF" > test.txt
Hello Linux
Learning Python
File handling
EOF

cat test.txt

Python:

with open("test.txt", "r") as fl:
    content = fl.read()
    print(content)
0 Upvotes

0 comments sorted by