I have to create a program which will print a greeting only to friendly bears. I have created this program but it gives me all the bears, the angry ones too.
bears = {"Grizzly":"angry", "Brown":"friendly", "Polar":"friendly"}
for bear in bears:
if "[bear]:friendly":
print("Hello, "+bear+" bear!")
else:
print("odd")