#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="")
私の出力に割り当てる範囲のループ出力は見えのPython 3.0 - 次のように変数
How long should the password be?4
GtRA
私はパスと呼ばれる変数に、この出力を保存し、テキストファイル
にその変数を保存したいですおかげ
は、変数名として 'pass'を使用してはならない[' pass'](HTTPS://docs.python .org/3/reference/simple_stmts.html#pass)文 – DavidG