r/PythonProjects2 • u/SweatyAd3647 • Oct 04 '25
Beginner challenge: write a Python script that generates strong, random passwords
Beginner challenge: write a Python script that generates strong, random passwords. It’s secure, practical, and definitely #pythonfun for Python for beginners. Post your code for feedback!
1
u/Familiar-Ad-7110 Oct 05 '25
I don’t know python that great but in C if you don’t seed the random function you get the same result all the time…. Is this the same in python?
2
u/JustAnotherTeapot418 Oct 05 '25
It's not. C is that way because it's a fairly old language, so the seed is initialized to some constant value (usually 1) unless you set it to something else using
srand().In most modern programming languages, the seed is set to some entropy source unless you set it yourself. Usually that entropy source is the system time. It's similar to calling
srand(time(NULL)), except you're no longer expected to do it yourself.1
1
1
u/Reasonable-Road-2279 Oct 07 '25
What's the name of the song?