Search This Blog

Thursday, 22 November 2012

Password contain atleast alpha,symbol & digit [Python]]

This program is check that password must contain , alpha,number & digits

   test = "anilasdfasdfl234234234@@@@"
   new = tuple(test)
   data = list(new)
   is_symb =False
   is_digit = False
   is_alpha = False

   for d in data :
      if d.isdigit():
          is_digit = True
      if d.isalpha():
          is_alpha = True
      if not d.isdigit() and not d.isalpha():
          is_symb = True
          break

  if is_symb == True and is_digit == True and is_alpha == True:
      print "password matched::::"
  else :
      print "password dosen't match..."