摘要: 本文用Python模拟随机漫步行为。 1 使用内建的的random模块 import random position = 0 walk = [position] steps = 1000 for i in range(steps): step = 1 if random.randint(0, 1) 阅读全文