def player_take(game, user_action):
    """Allows user to pick up items and puts them in the players inventory

    Player data is taken from the game state. Item data is also taken from the
    combination of the room and player's posion. Take the user's input and
    check if that input is in the room. If it is, we'll add it in the player
    inventory, if not just prompt "There is no such item"

    Args:
        game: contains the current game state
        user_action: the user action type in by keyboard

    Returns:
        Ture if successfully executed
    """
    player = game.player
    item = game.rooms[player.position['location']].door['item']
    key_word = next((word for word in user_action if word in item), 'item')
    if key_word in item:
        print("You have picked up the " + key_word)
        player.inventory.append(key_word)
        game.rooms[player.position['location']].door['item'].remove(key_word)
    else:
        print("There is no such item")
    return True