def myfunction():
for i in [1]:
constant1 = 10
constant2 = 'hello'
....
rest of the function code
def myfunction():
for putting_values in ['some constants']:
constant1 = 10
constant2 = 'hello'
....
rest of the function code