Untitled
if语句123456789101112x = int(input("Please enter an integer: "))if x < 0: x = 0 print('Negative changed to zero')elif x == 0: # elif 时else if 的缩写 print('Zero')elif x == 1: print('Single')else: print('More') 条件控制in 和 not in 用于执行确定一个值是否存在(或不存在)于某个容器 is 和 is not 用于比较两个对象是否是同一个对象 not取反 or and是短路运算符 := 海象运算符用于在表达式中赋值 比较操作支持链式操作。例如,a < b == c 校验 a 是否小于 b,且 b 是否等于 c。 1234567(1, 2, 3) < (1, 2, 4)[1, 2, 3] ...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy 123for i in range(1,250): i = i i+=i More info: Deployment