lundi 30 mai 2016

Randomizing List in Python3.3 [duplicate]

This question already has an answer here:

Hi guys I am a student trying to create a program for a nonprofit organization but need some help.

I want to randomize a list that I have

trained = ['name1,email1','name2,email2','name3,email3','name4,email4']

I need this so that everytime I run the program the values (the names and their corresponding emails) are random. This way it will print in a different order from the original list.Please note that the actual list does not have numbers like the list above, rather it has names and email addresses.

Thank you in advance!




Aucun commentaire:

Enregistrer un commentaire