2015-10-15 205 views

回答

2
tlist = ['Hello world', 
    'Hello world print', 
    'Text', 
    'World hello print'] 

print [i for i in tlist if "print" in i] 
0
for i in tlist: 
    if 'print' in i: 
     print '"print" is in the line"' 
相關問題