十二. Python基础(12)--生成器 1 ● 可迭代对象(iterable) An object capable of returning its members one at a time. Examples of iterables include all sequence types (such as list, str, and tuple) and some non-sequence types like dict and file and objects of any clas…
二. Python基础(2)--语法 1.实现一个简单的登录系统 '''# 形式1 n = 1 while n < 4: name = input("请输入姓名\n") if name == "Arroz": print("Welcome!") exit() else: print("Wrong name!") n += 1''' …
一.什么是数据类型?2018-12-20 20:57:3õ # (3) num = 0 while num < 10: num += 1 if num == 7: num += 1 # 7执行完了等于8, 然后打印8 print(num) I = 0 N = 2 print(I+N) 什么是数据类型? 我们人类可以很容易的分清数字与字符的区别,但是计算机并不能呀,计算机虽然很强大,但从某种角度上看又很傻,除非你明确的告诉它,1是数字,“汉”是文字,否则它是分不清1和‘汉’的区别的,因此,在每…