using for in loop to create a dictionary python code example
Example: python generate dictionary in loop
n = int(input())
ans = {i : i*i for i in range(1,n+1)}
print(ans)
n = int(input())
ans = {i : i*i for i in range(1,n+1)}
print(ans)