dimanche 23 septembre 2018

Python list, array,random

I have two separate arrays one called nList which contains the name of players and a second array called pList which has an array size of 5. pList will randomly generate numbers 1-5 to fill the array without making any duplicates. shown below. How do I put the players into new array with the player with position 1 at the start of the array.

Player a Postition [5]
Player b Postition [3]
Player c Postition [1]
Player e Postition [2]
Player f Postition [4]




Aucun commentaire:

Enregistrer un commentaire