shell pip install python-slugify python from slugify import slugify slug = slugify(string) print(slug) python slug = slugify(string, separator="_")