+ 13
Justice thanks! Your Mom , we can simplify the generation of the password by using the random method *choices* instead of *choice*. we can use it like: password_random = random.choices(password, k=password_length) it generates the requested number of characters (k=...) in one go, so we can omit the for loop. the result of this line is a list of characters, that can be joined to a string for output. then just print the password without any additional arguments.
2nd Jun 2023, 6:13 PM
Lothar
Lothar - avatar
+ 7
Your Mom , the link does not work, i can't see your code. > can you add the link by using the '+' symbol and *insert code*?
2nd Jun 2023, 5:58 PM
Lothar
Lothar - avatar
+ 4
Here is the app link for anyone on mobile trying to help: Edit to add AgentSmith's code. https://code.sololearn.com/c1NVorHhJKzj/?ref=app https://code.sololearn.com/cuBW8LBURGZf/?ref=app
2nd Jun 2023, 5:58 PM
Justice
Justice - avatar
+ 4
Lothar It does work, just not for mohile users. See my message. Your Mom is a PC user so he won't have access to the app links so I made it myself.
2nd Jun 2023, 5:59 PM
Justice
Justice - avatar
+ 2
Can you elaborate on the end goal that you're trying to do? Want to make sure I understand what you're asking. You're wanting it to print the password 4 times or give them 4 options or something? Or just not wanting to use end=""? Dunno if this helps, give me more info and I'll let ya know if we can figure it out: https://www.sololearn.com/compiler-playground/cuBW8LBURGZf
2nd Jun 2023, 5:52 PM
AgentSmith
+ 2
No probs!
2nd Jun 2023, 6:06 PM
Justice
Justice - avatar