Generate Python code to print the sum of two user-defined variables.
var1 = 3 
var2 = 7
var1 = 3
var2 = 7

sum = var1 + var2
print('The sum of var1 and var2 is ' + str(sum)) # prints 'The sum of var1 and var2 is 10'