If I have a Python tuple of contract expirations for, say, CME Eurodollar futures, such as:
GEcontracts = (GEH7.CME, GEM7.CME, GEU7.CME, GEZ7.CME, GEH8.CME, [and so on...])
Now I want to make some logic in a loop statement that will automatically construct all possible combinations that would make up spreads as calendars (+1/-1 or -1/+1), butterflies (+1/-2/+1 or -1/+2/-1) and condors (+1/-1/+1/-1), the resulting output of which I will use to query a datafeed and filter by other metrics.
What kind of statement would be a step in the right direction to get these spreads generated from the tuple?