Python - Grab Random Names
Question: Alright, so I have a question. I am working on creating a script that grabs a
random name from a list of provided names, and generates them in a list of 5.
I know that you can use the command

    
    
    items = ['names','go','here']
    
    rand_item = items[random.randrange(len(items))]
    

This, if I am not mistaken, should grab one random item from the list. Though
if I am wrong correct me, but my question is how would I get it to generate,
say a list of 5 names, going down like below;

    
    
    random
    names
    generated
    using
    code
    

Also is there a way to make it where if I run this 5 days in a row, it doesn't
repeat the names in the same order?

I appreciate any help you can give, or any errors in my existing code.

Edit: The general use for my script will be to generate task assignments for a
group of users every day, 5 days a week. What I am looking for is a way to
generate these names in 5 different rotations.

I apologize for any confusion. Though some of the returned answers will be
helpful.

Edit2: Alright so I think I have mostly what I want, thank you Markus Meskanen
& mescalinum, I used some of the code from both of you to resolve most of this
issue. I appreciate it greatly. Below is the code I am using now.

    
    
    import random
    items = ['items', 'go', 'in', 'this', 'string']
    rand_item = random.sample(items, 5)
    for item in random.sample(items, 5):
    print item
    


Answer: You could use
[`random.choice()`](https://docs.python.org/2/library/random.html#random.choice)
to get one item only:

    
    
    items = ['names','go','here']
    rand_item = random.choice(items)
    

Now just repeat this 5 times (a for loop!)

If you want the names just in a random order, use
[`random.shuffle()`](https://docs.python.org/2/library/random.html#random.shuffle)
to get a different result every time.

