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.
Still Need Help?
Join the QuestionCove community and study together with friends!
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!
Join our real-time social learning platform and learn together with your friends!
Latest Questions
ihavewrizz:
In a paragraph of 6-8 sentences, answer the AIM: u201cHow did World War II conclude in Europe?u201d Provide at least two pieces of evidence from todayu2019s
42 minutes ago
7 Replies
0 Medals
Juss1Jordan:
Honestly I don't know what no body on here but me is going thru but I know someon
1 hour ago
7 Replies
1 Medal