Q:

add keys together in a dictionary

Hei guys! I need help in a python program. I wanna make a method which returns the sum of the keys as a dictionary. But I get a error "object is not iterable".
def totaltAntallSalg (dic) :
   s = sum (dic.keys)
   return s

call_function = totaltAntallSalg({"Ahmed":2,"Nada":1, "hala":3 })

How can I solve  this problem?
thanks in advance

A:

How can you add strings ? It might be values that you want to add.  
To add values you may use following code:-
def totaltAntallSalg(dic):
   D={}
   D['sum']=sum(dic.values())
   return D

