pathlib real python code example
Example 1: pathlib path get directory of current file
import pathlib
pathlib.Path(__file__).parent.absolute()
Example 2: pathlib change extension
from pathlib import Path
filename = "mysequence.fasta"
new_filename = Path(filename).stem + ".aln"