<div dir="ltr"><div>>>> x=['','x1','x2','x3','   ']<br>>>> x<br>['', 'x1', 'x2', 'x3', '   ']<br>>>> [print("ok") for it in x if it.strip() !=""]<br>
ok<br>ok<br>ok<br>[None, None, None]<br><br></div>i understand there are three 'ok' in the output,but why i have the output of [None, None, None]<br></div>