[Python] Problem with a Lineup Optimizer due to players having multiple Positions

Discussão em 'Python' iniciado por Stack, Março 25, 2025.

  1. Stack

    Stack Membro Participativo

    i have a list of Hitters in python with their name,projection and Positions

    juan-soto 30.3773 ['OF']
    kyle-tucker 44.0626 ['OF']
    ...
    yordan-alvarez 32.510200000000005 ['CI', 'OF']
    william-contreras 26.7904 ['CI', 'MI']


    from this list i want to get the best possible lineup with 1 CI Slot, 1 MI Slot, 1 OF Slot and 2 FLEX Slots(any Position), my problem is that i cant just check if every position is available in a combination because players have more than one position, please help

    Continue reading...

Compartilhe esta Página