While you could rescale random.random , why not use random.uniform instead? >>> import random >>> [random.uniform(0, 7) for i in range(4)] ... ... <看更多>
Environment data VS Code version: 1.28.2 Extension version (available under the Extensions sidebar): XXX OS and version: Windows 10 Python ... ... <看更多>