[Tutor] if string contains dictionary key

Steve stevel@softhome.net
Thu, 10 Aug 2000 15:21:09 -0400


I know I am missing something obvious, but I am having a=
 difficult 
time trying to get this to work.

s =3D 'This string contains a CLR'

d =3D {'CLR ': 'CLEAR', 'CA': 'ACCEPT', 'CR': 'CALL REQUEST'}


if s has d.keys():
   do stuff