how to take a sample with random fraction being 1 python code example Example: python choose sample from list with replacement import random random.choices(list, k = 4)