the code is as follows:
s = ["adam", "xxx", "lisa"]
L = ["adam", "xxx", "lisa", "bart"]
for x in L:
print "this is ---%s" % x
if x in s:
print x
L.remove(x)
print L
the results are as follows:
this is-adam
adam
this is-lisa
lisa
["xxx"," bart"]
[Finished in 0.2s]
Why is" xxx" directly ignored?