how to create dictionary in python using loop