stdio.py 文件源码

python
阅读 43 收藏 0 点赞 0 评论 0

项目:MIT-CS-lectures 作者: William-Python-King 项目源码 文件源码
def readAll():
    """
    Read and return as a string all remaining lines of standard input.
    """
    global _buffer
    s = _buffer
    _buffer = ''
    for line in sys.stdin:
        if sys.hexversion < 0x03000000:
            line = line.decode('utf-8')
        s += line
    return s

#=======================================================================
# For Testing
#=======================================================================
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号