check this out:
>>> import string
>>> def strong(s):
... if len(list(set(s)&set(string.ascii_lowercase)))>0 and len(list(set(s)&set(string.ascii_uppercase)))>0 and len(list(set(s)&set(string.digits)))>0 and len(list(set(s)&set(string.punctuation)))>0:
... return "Strong"
... else: return "Weak"
...
>>> strong("Hello?baby1") # all good
'Strong'
>>> strong("Hello?baby") # no mumeric
'Weak'
>>> strong("?baby") # no uppercase, no numeric
'Weak'
>>> strong("ljvjdl48?H") # all good
'Strong'
>>> strong("hello how are you") # no numeric,no uppercase, no punctuation
'Weak'