1- Create a list with length of P, that contain only "0" elements
2- Work with this list to change the element at the corresponding index
3- At the end, join the element of the list to get one string
p = "11100011"
q = "00000011"
list_x = ["0"]*len(p)
for i in range(len(p)):
if (p[i] == "1") or (q[i] == "1"):
list_x[i] = "1"
str = "".join(list_x)
print (str)
it gives you
11100011
for more details:
An important point here is the index i, this method work independently where you start the strings (from beginning or the end or at any point).
If you want to start from the beginning of the string, so you can use the solution proposed by others (@Bharel and @Jab).
x = ""
for i in range(len(p)):
if (p[i] == "1") or (q[i] == "1"):
x += "1"
else:
x += "0"