O que FileName = Path (arquivo) .stem Python

from pathlib import Path

Path('/root/dir/sub/file.ext').stem

# returns 'file'
Agreeable Alpaca