Skip to content

Instantly share code, notes, and snippets.

@techwithshadab
Created November 3, 2021 21:02
Show Gist options
  • Save techwithshadab/229460687965b6954404a2dff6f9aab7 to your computer and use it in GitHub Desktop.
Save techwithshadab/229460687965b6954404a2dff6f9aab7 to your computer and use it in GitHub Desktop.
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