human
Generate all binary strings from given pattern | Recursive function to generate all binary strings formed by replacing each wildcard character by 0 or 1.
replace ' ? ' by '0' and recurse.
replace ' ? ' by '1' and recurse.
NOTE : Need to backtrack as string is passed by reference to the function.
Driver code"
Solution in Python:

Can you provide a code to generate all binary strings from given pattern and the other steps required?
assistant
#Here is code to generate all binary strings from given pattern and the other steps required.
 def _print ( string , index ) :
	if index == len ( string ) :
		print ( ' ' . join ( string ) )
		return
	if string [ index ] == " ? " :
		string [ index ] = '0'
		_print ( string , index + 1 )
		string [ index ] = '1'
		_print ( string , index + 1 )
		string [ index ] = ' ? '
	else :
		_print ( string , index + 1 )
if __name__ == " _ _ main _ _ " :
	string = "1 ? ? 0?101"
	string = list ( string )
	_print ( string , 0 )