首先,你的数据结构定义错了,没有这种结果。只有{‘box1':[xx,xx,xx]}
for key,vals in 你的字典对象:
print '%s has these balls ' %key
for val in vals:
if val.find('ball') >= 0:
print val
用find方法找到有ball的字符,打印出来就行了