If you want to be secure and create your own random password generator instead of having an app or website do it for you, you can create one in Python. This wikiHow will show you how to keep your information safe by creating a random password generator.

Steps

  1. 1
    Import a random library.
  2. 2
    Create a function that allows you to shuffle the string.
  3. 3
    Ask for the user to input the length they want their password to be.
  4. 4
    Create a value that stores an empty list.
  5. 5
    Check to see if the user's input is greater than 0. If it is, you can now create your password generator.
  6. 6
    Create a loop to iterate through the length of the password.
  7. 7
    Out of your loop, create a value that stores your random character list into it.
  8. 8
  9. 9
  10. 10
    Now you can run it!

About This Article

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time. This article has been viewed 1,460 times.
How helpful is this?
Co-authors: 4
Updated: February 11, 2021
Views: 1,460
Categories: Python