fpl/models/user.py
def _id_to_element_type(player_id, players):
    """Helper for converting a player's ID to their respective element type:
    1, 2, 3 or 4.

    :param player_id: A player's ID.
    :type player_id: int
    :param players: List of all players in the Fantasy Premier League.
    :type players: list
    :return: The player's element type.
    :rtype: int
    """
    player = next(player for player in players
                  if player["id"] == player_id)
    return player["element_type"]
Helper for converting a player's ID to their respective element type:
    1, 2, 3 or 4.

    :param player_id: A player's ID.
    :type player_id: int
    :param players: List of all players in the Fantasy Premier League.
    :type players: list
    :return: The player's element type.
    :rtype: int
    
Helper for converting a player's ID to their respective element type:
1, 2, 3 or 4.
Helper for converting a player ' s ID to their respective element type : 1 2 3 or 4 .
def _id_to_element_type(player_id, players):
    player = next(player for player in players
                  if player["id"] == player_id)
    return player["element_type"]
def _id_to_element_type ( player_id , players ) : player = next ( player for player in players if player [ "id" ] == player_id ) return player [ "element_type" ]
Helper for converting a player's ID to their respective element type:
1, 2, 3 or 4.
Helper for converting a player ' s ID to their respective element type : 1 2 3 or 4 .
"""Helper for converting a player's ID to their respective element type:
    1, 2, 3 or 4.

    :param player_id: A player's ID.
    :type player_id: int
    :param players: List of all players in the Fantasy Premier League.
    :type players: list
    :return: The player's element type.
    :rtype: int
    """
The player's element type.
The player ' s element type .
int
player_id
A player's ID.
A player ' s ID .
players
List of all players in the Fantasy Premier League.
List of all players in the Fantasy Premier League .