Your code is not working properly.
It says "#....." or "$....." or "@....." are valid passwords, and that´s not true.
So only one check is working and that´s if there is a special character in the password,
all other checks are not working as you assume.
Maybe have a look here: https://docs.python.org/3/library/string.html
string.ascii_lowercase .ascii_uppercase and .digits might be interesting
think about the possibilities of using any():
https://docs.python.org/3/library/functi...ht=any#any
and combine that with using all()
https://docs.python.org/3/library/functi...ht=all#all
btw: input() returns a string, so no need to convert a string to a string using str()
It says "#....." or "$....." or "@....." are valid passwords, and that´s not true.
So only one check is working and that´s if there is a special character in the password,
all other checks are not working as you assume.
Maybe have a look here: https://docs.python.org/3/library/string.html
string.ascii_lowercase .ascii_uppercase and .digits might be interesting
think about the possibilities of using any():
https://docs.python.org/3/library/functi...ht=any#any
and combine that with using all()
https://docs.python.org/3/library/functi...ht=all#all
btw: input() returns a string, so no need to convert a string to a string using str()