Write a Python code to calculate the mean and variance of a given list of numbers.
def calculate_mean_variance(nums):
 mean = sum(nums)/len(nums)
 variance = 0

for num in nums:
 variance += (num - mean)**2
 variance = variance/len(nums)

return mean, variance