Matches Method In String In Python Function Definition