Q:

find mixed case word in python string

Some context: 
I have never tried to program anything before 3 days ago, so I am a complete beginner. I am trying to learn python, and I am learning through a free module on Grok learning https://groklearning.com/courses/ There is an answer to a question that I have mostly figured out but can't finish. The module is for an introductory course so I am confident that there is a fairly simple solution, but everything ive seen for similar situations was over my head.
The problem is: "Robots in a line!
The robots are invading (your written work)! Robots are sneaking into your text files. Write a program that reads in a line of text from the user and prints out whether there is a robot in the line of text.
If the word robot occurs in all lowercase letters in the line, print out: There is a small robot in the line.
If the word ROBOT occurs in all uppercase letters in the line, print out: There is a big robot in the line.
If the word robot occurs in the line in any combination of upper and lowercase letters, print out: There is a medium sized robot in the line.
Otherwise, if none of these conditions hold true, you should print out: No robots here.
Your program should work like this:
Line: I'm baking chocolate robot brownies.
There is a small robot in the line. 

Here is another example:
Line: Look at the rOBOt down the road.
There is a medium sized robot in the line.

If the letters robot occur in the line, but as part of a bigger word, you should not report any robots found."
Line: There's a strobotron at the concert.
No robots here.

My solution thus far:
line = input("Write something:")
lr = ("There is a small robot in the line.")
br = ("There is a big robot in the line.")
mr = ("There is a medium sized robot in the line.")
nr = ("No robots here.")
check1 = ("robot" in line)
check2 = ("ROBOT" in line)
lowcase = check1
upcase = check2
if(lowcase == True):
  print(lr)
elif(upcase == True):
  print(br)
else:
  print(nr)

Please remember I am a complete beginner so your solution may need a little bit of explaining, and feel free to critique the code I've already written, but so far it seems to work. Thank you for taking the time to read all this and help.

A:

How about using str.lower or str.casefold:
>>> 'Look at the rOBOt down the road.'.lower()
'look at the robot down the road.'

>>> 'robot' in 'Look at the rOBOt down the road.' # check1
False
>>> 'ROBOT' in 'Look at the rOBOt down the road.' # check2
False
>>> 'robot' in 'Look at the rOBOt down the road.'.lower()
True

if lowcase:
    print(lr)
elif upcase:
    print(br)
elif 'robot' in line.lower():
    print(mr)
else:
    print(nr)

