r = input("Line: ")
r = r.split()
for rs in r:
if rs == "robot":
print("There is a small robot in the line.")
elif rs == "ROBOT":
print("there is a big robot in the line.")
elif rs[0] == "r" or "R" and rs[1] == "o" or "O" and rs[2] == "b" or "B" and rs[3] == "O" or"o" and rs[-1] == "T" or "t":
print("There is a medium sized robot in the line.")
else:
print("There are no robots in the line.")
This works but I get an error statement that says that the string index is out of range?? Any ideas?