Jan-29-2018, 06:09 PM
Well, I am not new to Python, actually I am newer than you. I am just trying to help so excuse me if my help is not what you are expecting.
I see that you have 8 countries available for the user, and the user has to use only 5 countries from the list. I cannot understand what the else section is doing.
I see that you have 8 countries available for the user, and the user has to use only 5 countries from the list. I cannot understand what the else section is doing.
if any(e.lower() == 'germany' for e in exchanges): global data_germany data_germany = quandl.get("CHRIS/EUREX_FDAX1", authtoken='hZcy4YazMK8shJxDxV-q', start_date=start, end_date=end) return data_germany else: print("Please, enter a coutry specified in the list") exchange1 = NoneWhat I see, that someone would choose any combination from the 8 countries, or would even enter invalid country. So, why not to check using the if statement whether the countries in [exchanges] is belonging to the original preferred 8 countries?