Instruction
Good job! One of the menu options will check the relationship between a player and a club. To that end, we'll need a function that asks the user to pick a player index from the list of players. Let's write it now.
Exercise
Create a function named get_player_index(players) that accepts a list of players and:
- Lists all the players' indexes with their names, each in the following format:
>> {index} {firstname} {lastname}Here's an example:>> 0 Marcin Gortat >> 1 Kevin Durant
- Asks the user to pick a player's index. Use the following prompt:
>>> Pick player index:
- Returns the user's choice as an integer.
Assume that the user always provides a correct index value.
Stuck? Here's a hint!
Because you want to print all players' indexes, use the following for loop:
for i in range(len(players)):
To get the index from the user, use the input() function. Remember to convert the result to an integer.



