Your question is Palindrome With Wildcards. 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.
Bentley iTwin model metadata may contain unknown characters represented by ?. Return "yes" if the string can be made into a palindrome by replacing each ? with any single character, or return "no" otherwise.
A replacement must be consistent only within its mirrored position. Different wildcards may be replaced with different characters. Characters that are not ? cannot be changed.
Implement can_be_palindrome(s), where s is a string. Return the string "yes" when at least one valid palindrome can be formed, and "no" otherwise. The input contains lowercase English letters and ? characters.
def can_be_palindrome(s):