Ask your own question, for FREE!
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW) 94 Online
OpenStudy (anonymous):

This is the optional problem on secret messages. How do I test for membership in a list? e.g, For c in phrase: If c is in this list [list of upper case alphabet]? #### how to code this line statements I answered my own question -- found it in old lecture notes on the MIT website: ...we can check whether an element is in a list really simply with the in keyword. Something like 'A' in ['A', 'B'] returns True, but 'C' in ['A', 'B'] returns False.

OpenStudy (anonymous):

are you talking about python?

OpenStudy (anonymous):

I have closed my question because I answered it myself! ... we can check whether an element is in a list really simply with the in keyword. Something like 'A' in ['A', 'B'] returns True, but 'C' in ['A', 'B'] returns False.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
arrivh: IM WALKing to the park
2 minutes ago 2 Replies 1 Medal
arrivh: WHO WANT MY DISCORD
21 minutes ago 7 Replies 1 Medal
luhbabyliyahh: Is my daughter cute her name is zalaria (PFP)
5 seconds ago 17 Replies 1 Medal
luhbabyliyahh: If my daughter cute her name is zalaria (PFP)
51 minutes ago 0 Replies 0 Medals
Gucchi: leadership help
50 minutes ago 14 Replies 2 Medals
Arizona: HELLLp science ASAP
1 hour ago 7 Replies 0 Medals
Gucchi: leadership help
2 hours ago 10 Replies 2 Medals
Limitless2: what is circumference of a circle
2 hours ago 12 Replies 3 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!