管道重定向输出

简介

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# coding:utf-8

import sys
text = sys.stdin.read()
words = text.split()
wordcount = len(words)
print(text,'\n',words)
print('Wordcount:',wordcount)
print('text type is %s' %type(text))

# a = 'apple app'

# print(a.split())