我得到如何打开文件,然后使用Python的预先构建函数与他们。但是sys.stdin如何工作? for something in sys.stdin:
some stuff here
lines = sys.stdin.readlines()
sys.stdin上述两种不同用法有什么区别?它从哪里读取信息?是通过键盘吗,还是我们还要提供一个文件?
没有sys.getlinuxversion(),我觉得我可能必须从几个地方拼凑它(这很好);但是,也许不是? import sys, os
from collections import namedtuple
## This defines an interface similar to the object that getwindowsversion() returns
## (I s
#-*- coding: UTF-8 -*-
#spade=u"\u2660"
#heart=u"\u2665"
#diamond=u"\u2666"
#clubs=u"\u2663"
import random
print 'Welcome to SANDCRAB. This is your deck of cards.'
seg1='''_________'''
seg2=''