FYI for anyone running across this question in the year 2020+. Python 3.6+ has a secrets module specifically for this purpose:
import secrets
password_length = 13
print(secrets.token_urlsafe(password_length))
FYI for anyone running across this question in the year 2020+. Python 3.6+ has a secrets module specifically for this purpose:
import secrets
password_length = 13
print(secrets.token_urlsafe(password_length))