Use case 1 :
str = '?0?' #str is input string , we need to replace every '?' with [0,1].
so the resulting output will be :
['000','100','001','101']
use case 2 :
str = '?0' #input
Expected output :
['00','10']
use case 3 :
str='?'
Expected output :
['0','1']
The length of the string and number of '?' in string may vary for different inputs.