Skip to content
Advertisement

Can i shuffle a string in python?

I created a password generator program and I have gotten the random letters, numbers, and symbols in quantities decided by the input. I can’t seem to figure out how to shuffle the password, though.

JavaScript

i can generate a random password eg adu145′!@ but i would like to scramble all the characters as well

Advertisement

Answer

Add the line before printing the password

JavaScript

Here is the link for documentation of random.sample

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement