16 lines
199 B
Python
16 lines
199 B
Python
import re
|
|
|
|
um_regex = re.compile(r"\bum\b", re.IGNORECASE)
|
|
|
|
|
|
def main():
|
|
print(count(input("Text: ")))
|
|
|
|
|
|
def count(s):
|
|
return len(um_regex.findall(s))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|