fork download
  1. s = 'test$test$test123'
  2. specialChars = "!@#$%&*"
  3. num = 0
  4. sym = 0
  5.  
  6. for char in s:
  7. if char.isdigit():
  8. num += 1
  9. if char in specialChars:
  10. sym += 1
  11.  
  12. if num > 1 and sym == 2:
  13. print("Match")
  14.  
Success #stdin #stdout 0.02s 9212KB
stdin
Standard input is empty
stdout
Match