Simple Script That Counts the Words in sys.stdin,countssys.stdin,import syste
Simple Script That Counts the Words in sys.stdin,countssys.stdin,import syste
import systext = sys.stdin.read()words = text.split()wordcount = len(words)print 'Wordcount:'print wordcount
相关内容
- Redirects prints to file,redirectsprints,x = 99y = 'H
- Redirecting Error Information,,import sys f
- Get user input,getuserinput,car = raw_i
- Introducing or,introducingor,print 'a' or
- Use # to start a comment,,SPAM = 1
- A comment on the same line as code,commentsame,print 2+2 #
- Dictionary for loop,dictionaryforloop,dict = {'x':
- Demonstrates global variables,,def read_glo
- Use global key word to reference outside global variables,reference
- if structure,structure,password = r
评论关闭