I have strings such as 'pXoX prawa', they might contain a random number of X's. I want to replace these X with polish special characters
['ą', 'ć', 'ę', 'ł', 'ń', 'ó', 'ś', 'ź', 'ż']
and generate strings with all possible variants. In the case of "pXoX prawa" there are two X's, so all the possible combinations are 9^2=81, where 9 is the number of Polish special characters. I could brute force program it, but I wonder if anybody can come up with a 1-2 lines solution. Maybe some recursive coding. Any idea? If you want to use external libraries no problem.