摘要: 这篇文章主要是下面的评论区,仅适用于C++上课同学讨论. 阅读全文
posted @ 2022-04-10 11:19 WindowsRegedit 阅读(70) 评论(0) 推荐(0)
摘要: 1.请观看下列代码并回答问题: import collections from random import choice Card = collection.namedtuple('Card', ['rank', 'suit']) class FrenchDeck: ranks = [str(n) 阅读全文
posted @ 2022-04-10 11:15 WindowsRegedit 阅读(112) 评论(0) 推荐(0)
摘要: 例如,我们要打印出一句“Hello World!”,这样就太low了: print("Hello World!") 至少也得封装一层函数吧: def main(sentence="Hello World!"): print(sentence) if __name__ == "__main__": m 阅读全文
posted @ 2022-04-10 11:14 WindowsRegedit 阅读(122) 评论(0) 推荐(0)