I tried run this code but I have an error:
a4 local variable referenced before assignment
a1 = '/fr/store/a'
try:
a2 = '/fr/store/b/collection/3432'
a2_store = "store"
a3 = a2.split ("store/")
a4 = a3[0]
if a2_store in a2:
print ('a2')
except:
if a4 not in a1:
print ('a1')