os.startfile(f"profile{i}.lnk")
os.system("taskkill /im firefox.exe")
os.system("taskkill /im firefox.exe")
import subprocess as sp
sp.Popen('taskkill /im firefox.exe /f')
import psutil #pip isntall psutil
for proc in psutil.process_iter():
if proc.name() == 'firefox.exe':
proc.terminate()