标准语句:a if condition else b .判断条件大于0,选择a,反之,选择b。
e.g. step = 1 if random.randint(0, 1) else -1(利用python进行数据分析120页)