I am having a function in python
def func(dataFrame,country,sex):
varible_name=dataFrame[(dataFrame['land']==country) & (dataFrame['sex']==sex)]
Now, for example, I call this function
func(dataFrame,'England','M')
I want that variable name be England_M instead of variable_name.
mydict = {England_M: myvalue}. That gives you almost all the advantages of what you ask without the disadvantages.my_dict['{}_{}'.format(country, sex)] = ...my_dict[(country, sex)] = ...