Inspired Python
◆◆◆
>>> from pathlib import Path
>>> p = Path('/home/inspiredpython/')
# Append `hello.txt` to the path
>>> hello = p / 'hello.txt'
>>> print(hello)
'/home/inspiredpython/hello.txt'
# Check if the file exists
>>> hello.exists()
True
>>> from pathlib import Path
>>> p = Path('/home/inspiredpython/')
# Append `hello.txt` to the path
>>> hello = p / 'hello.txt'
>>> print(hello)
'/home/inspiredpython/hello.txt'
# Check if the file exists
>>> hello.exists()
True
We'll tell you about the latest courses and articles.