I have a list of integers and I want to concatenate them in a loop.
This is what I have so far
a = [3, 4, 6]
temp = []
for i in a:
query = 'Case:' + str(i)
temp.append(query)
print(' OR '.join(temp))
>>> Case:3 OR Case:4 OR Case:6
Is there a better way to write this?
' OR '.join('Case:' + str(i) for i in a)