我得到如何打開文件,然後使用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=''