Hyphens? Not a problem!

Report a typo

Your next task is to write a program that will match hyphenated words, such as:

  • twenty-one
  • long-term
  • co-worker
  • well-known

It should print True if the word is written with a dash, and False otherwise.

Sample Input 1:

good-looking

Sample Output 1:

True
Write a program in Python 3
import re

# your code here
word = input()
___

Create a free account to access the full topic