def count_list():
num = 0; alph = 0; space = 0; other = 0
message = str()
data1 = open(r'D:\fishc\string1.txt').readlines()
lenth1 = len(data1)
for i in range(lenth1):
for j in data1[i]:
asc = ord(j)
if 47<asc<58: num += 1
elif 64<asc<91 or \
96<asc<123:
alph += 1;
message += chr(asc)
elif asc == 32: space += 1
else:other += 1
print 'The string has',num,'number,',\
alph,'letter,',space,'space and',other,'other letter.'
print 'The message is',message