#Imports
import string
import random
import time
digits = string.digits
letters = string.ascii_letters
punctuation =("!\"\<>@#£$%^&*")
PasswordCode = letters+punctuation+digits
PassLenInput = input("How long should the password be?")
PassLenInput = int(PassLenInput)
for i in range(PassLenInput):
print(random.choice(PasswordCode),end="")
내 출력 지정 범위 루프 출력 보인다파이썬 3.0 - 다음과 같이 변수
How long should the password be?4
GtRA
나는 통과라는 변수에이 출력을 저장 한 다음 텍스트 파일
에 그 변수를 저장하고 싶습니다감사
, 당신은 변수 이름으로'pass'을 사용하지 말아야합니다 ['pass'] (HTTPS : //docs.python .org/3/reference/simple_stmts.html # pass) 문 – DavidG