I'm sure this is already out there somewhere but I cannot find it. So I have two list:
sheet_names = ['T307710_TOOLS', 'T307710_CSYS'] #This is pulled in from wb.get_sheet_names()
look_for = ['tools', 'Tools', 'TOOLS', 'setup', 'Setup', 'SETUP'] #these are the terms I am looking for in the sheet names
I want to compare the two and then pull the 'T307710_TOOLS' name and position and then store that in a variable tool_sheet.
This is my attempt at it, I am not sure how to compare the two list in the nested for-loop:
#multiple sheet names, only 1 will specify either TOOLS or SETUP
sheet_names = ['T307710_TOOLS', 'T307710_CSYS'] #wb.get_sheet_names() in my code
#the sheet name I am looking for can be anything from T3771_TOOLS to setupsheet
look_for = ['tools', 'Tools', 'TOOLS', 'setup', 'Setup', 'SETUP']
#me attempting to iterate through the sheet names
for i in sheet_names:
for j in look_for:
if j is in i:
tool_sheet = i