LeetCode:890. Find and Replace Pattern - Python

NoSuchKey