摘要:
灵活的if-else a = 3 if False else 5 # 等价于 if False: a = 3 else: a = 5 灵活的and/or # 当前面为真,才会进行后面的运算 b = True and 3 # 当前面为假,后面就不会运算了 # b = False and 3 # 当 阅读全文
摘要:
''' 输入2,5,打印: 1 2 3 4 5 6 7 8 9 10 ''' #行数 m = int(input('请输入一个整数')) n = int(input('请在输入一个整数')) for i in range(m): for j in range(n): num = i * n + j + 1 print(num,end='') ... 阅读全文