Create the patterns to search digit , upper case alphabet , lower case alphabet and special character
digit = re . compile ( " ( \\d ) " ) NEW_LINE upper = re . compile ( " ( [ A - Z ] ) " ) NEW_LINE lower = re . compile ( " ( [ a - z ] ) " ) NEW_LINE spChar = re . compile ( " ( \\W ) " ) NEW_LINE