# -*- coding: utf-8 -*-
#使用内建的isinstance函数可以判断一个变量是不是字符串:
x = 123
y = 'abc'
print(isinstance(x,str))#false	
print(isinstance(y,str))#true
#列表生成式
L1 = ['Hello', 'World', 18, 'Apple', None]
L2 = [a.lower() for a in L1 if isinstance(a,str)]
print L2