Your question is Determine String Isomorphism. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Datavant processes identity-related tokens whose literal characters may differ while their structural patterns remain equivalent. Given two strings, determine whether they are isomorphic.
Two strings are isomorphic if every character in the first string can be consistently mapped to exactly one character in the second string, and no two different characters map to the same character. Character order must be preserved, and repeated characters must repeat in the same positions.
Implement is_isomorphic(s, t), where s and t are strings. Return True if they are isomorphic, otherwise return False. Treat characters as case-sensitive, and do not modify either input.
def is_isomorphic(s, t):