python pathlib path to string code example
Example 1: python path from string
from pathlib import Path
str_path = "my_path"
path = Path(str_path)
Example 2: pathlib change extension
from pathlib import Path
filename = "mysequence.fasta"
new_filename = Path(filename).stem + ".aln"