>>14
from pathlib import Path

p = Path('hoge.jpg').resolve().absolute()
ext_without_dot = p.suffix[1:]
basename_without_ext = p.stem