Created
November 3, 2021 21:02
-
-
Save techwithshadab/229460687965b6954404a2dff6f9aab7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def selection_to_picks(num_assets, selection): | |
purchase = [] | |
for i in range(num_assets): | |
if selection[i] == 1: | |
purchase.append(stock_list[i]) | |
return purchase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment