Check if a string follows a pattern like 'abab' where same letter maps to same word. Example: 'abab', 'cat dog cat dog' => True
Implement this function:
def follows_pattern(pattern: str, s: str) -> bool:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: pattern, s.
Input
'abab'
'cat dog cat dog'
Output
True