You need to define a regexp pattern using assertions that returns a word following a hyphen -.
Preconditions and postconditions
Posthyphen
Report a typo
Sample Input 1:
cat-dogSample Output 1:
dogWrite a program in Python 3
import re
string = input()
# your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.