Lecture 24:

posted Mar 8, 2013, 6:15 AM by Samuel Konstantinovich   [ updated Mar 20, 2014, 4:59 AM ]
>>>message = "Python is simple and powerful"
>>>message.find("Python")
0
>>>message.find("yth")
1
>>>message.find(" i")  #space then i
6
>>>"Python" in message
True
>>>"python" in message
False

The in command (a in b) returns true when a is located at least once in b.


CLASSWORK:

You will work with your new-new partner today on problems from CodingBat.com : 
(make sure you click on the python section)

Section string-1
without_end
combo_string

Section Logic-2 
round_sum
make_bricks *challenging do this last if you have problems*

Section warmup-2
front_times
string_bits
string_splosion
string_match
 
Comments