I am trying to check to see if there is the word robot in a line. (I'm learning python. Still very new to it.) If the word 'robot' is in a line it prints something out. Same with 'ROBOT'. However, I need to know how to output when robot is in the line but in a randomly mixed case, eg rObOt. Is this possible? It seems like I would need to write out every combination. I'm using Python 3. Thanks :).
if ' robot ' in line:
print("There is a small robot in the line.")
elif ' ROBOT ' in line:
print("There is a big robot in the line.")
elif 'rOBOt' in line:
print("There is a medium sized robot in the line.")
else:
print("No robots here.")