for symbol in stock: try: sector = yf.Ticker(symbol).info[\'sector\'] name = yf.Ticker(symbol).info[\'shortName\'] cap = yf.Ticker(symbol