input: Write a function to classify comments as spam or ham using the given data and probabilities.
  assert classify("free money now") == 'spam'
  assert classify("urgent discount here") == 'spam'
  assert classify("come here now") == 'ham'
  assert classify("promo buy") == 'ham'
output: def classify(comment):
      spam_words = {'free', 'money', 'urgent', 'discount'}
      ham_words = {'come', 'here', 'promo', 'buy'}
  
      spam_count = sum(1 for word in comment.split() if word in spam_words)
      ham_count = sum(1 for word in comment.split() if word in ham_words)
  
      return 'spam' if spam_count > ham_count else 'ham'