0
Password Generator
https://code.sololearn.com/c6WC3Bys9bzG/?ref=app Anyone can explain to me how does this works? I've recently finished learning python but now I feel like I don't know anything lol
2 Respostas
+ 2
Python’s random module has a function called sample. Sample takes two inputs, in this case, a string of characters and the amount of times you want it to get a random character from that string. The "".join() takes that list and joins each item together into one string with no delimeter so that it becomes one “word”, and there you have a password made randomly from the character string “x”!
0
Now I get it. Thank you for your help :)