waste_li = ['废纸','塑料袋','食材废料','餐巾纸']
#可回收垃圾
recyclable_waste=('废纸','塑料瓶','易拉罐','金属元件','玻璃瓶','废旧衣物','废弃家具','旧数码产品','旧家电')
#厨余垃圾
kitchen_waste=('食材废料','菜帮菜叶','剩菜','剩饭','蔬菜水果','瓜皮果核','蛋壳','鸡骨','鱼骨','过期食品')
#有害垃圾
harmful_waste=('废电池','废灯管','消毒棉棒','废油漆','废杀虫剂')
#其他垃圾
other_waste=('砖瓦灰土','餐巾纸','保鲜膜')
if len(waste_li)==0:
print('内容不能为空')
else:
for waste in waste_li:
if waste in recyclable_waste:
print(f'{waste}是可回收垃圾')
elif waste in kitchen_waste:
print(f'{waste}是可回收垃圾')
elif waste in harmful_waste:
print(f'{waste}是有害垃圾')
elif waste in other_waste:
print(f'{waste}是其他垃圾')
else:
print('没有找到所属分类')
运行结果: