Nov-11-2018, 09:23 AM
(This post was last modified: Nov-11-2018, 09:23 AM by MasterJediKnight7.)
Could you please edit your message with python in brackets [].
It would be much easier to read because We can see where are the if or while loops.
With(without the "" and the spaces between python and the brackets):
"[ python ]"
"[ /python ]"
I didn't know the existence of the "re.search" function.
But here is something simple that works (I didn't write the whole alphabet):
It would be much easier to read because We can see where are the if or while loops.
With(without the "" and the spaces between python and the brackets):
"[ python ]"
"[ /python ]"
I didn't know the existence of the "re.search" function.
But here is something simple that works (I didn't write the whole alphabet):
ar=['a','b','c','d','e','f','g'] def password_1(x): i=0 while password == ' ': print("Please enter a valid password") while i<len(password) and (password[i] in ar): i+=1 if i>len(password)-1: print("valid") else: print("invalid") password = input("Please enter your password: ") password_1(password)