7 Respostas
+ 3
NotAPythonNinja thank you alot
https://code.sololearn.com/c8PXKOOXI05B/?ref=app
+ 6
Where's your attempt?
+ 6
To generate multiple random characters , using choices() is always a good idea. The code gets shorter and still has a good readability.
You can further do an optimization in limiting the import of not necessary functions / methods. Instead of importing module string completely, or module random completely, you can do it like this:
from string import ascii_lowercase as asc_lo
from random import choices
print(''.join(choices(asc_lo, k=42)))
+ 4
NotAPythonNinja thank you
But your code prints separate characters.. I wanted one that prints a string of text
+ 3
CarrieForle I'm Still figuring it out 😃 Trying to debug it
+ 3
I've tried but it seems to have bugs
Someone should help me out
https://code.sololearn.com/c64DCh53HoC2/?ref=app
+ 3
Lothar thanks alot