摘要:
1. 三元表达式 name=input('姓名>>: ') res='SB' if name == 'aaaa' else 'NB' print(res) 2. 列表推导式 #1、示例 egg_list=[] for i in range(10): egg_list.append('鸡蛋%s' %i 阅读全文
摘要:
1. Python中函数的概念 1.1 python中函数概念 Python中函数是逻辑结构化和过程化的一种编程方法。 1.2 python中函数定义方法解释 python中函数定义方法: def test(x): "The function definitions" x+=1 return x d 阅读全文