Загрузка данных


import subprocess
profile = subprocess.check_output("netsh wlan show profiles",
                                  shell=True).decode()

names = [line.split(":")[1].strip()
         for line in profiles.split("\n") if "All user Profile" in line]
for i, n in enumerate(names, 1):
    prnt(f"[{i}] {n}")
ch = int(input("\nChoose number: "))
wifi = names[ch - 1]
result = subprocess.check_output(
    f"netsh wlan show profile \"{wifi}\" key=clear",
    shell=True).decode()
print("\n" + result)