fo = open("3","r+")print fo.name,fo.modestrs = fo.read()res = ''for x in strs: obj = re.match(r'[a-z]',x) if obj: res += obj.group()print res