I am trying to port some Python code and I am a little lost on small issue which I would appreciate some advice.
I understand the in operator but I am a little unclear on what the : operator does in this example.
if foo in bar[i][:2]:
    # do something
In http://docs.python.org/tutorial/introduction.html#strings it states that the : operator makes the first two characters only if this is a string. However when used with a list like this is that what will happen as well? So does this just mean the first 2 characters of the string in th
 
     
    