dct = {1:'James', 2:'Alex', 3:'Thomas'}
if dct == 'James':
print('There is a James in the dictionary.')
else:
print("There is no James.")
I can't seem to figure out why this if-else statement isn't working, I know it's something small but I keep getting the wrong output. Anyone know why? Is it a problem with my dictionary? Thanks for the help!
{1:'James', 2:'Alex', 3:'Thomas'}is not the same thing as'James'.