Question d’entretien chez DocMagic

Python - For a given set of string, write a code to replace every character with "X" except the last 3 letters. For example : if the string is "123545678", the result is "XXXXXX678" if the string is "abc252", the result is "XXX252"