#Just defining strings needed for later
Mc = "Mc"
O = "O'"
#What is your name?
name = raw_input('What is your first name?')
name2 = raw_input('What is your last name?')
#Setting up the grammar for all of these weirdly typed names
game = name.lower()
game2 = name2.lower()
lame = game[1:len(game)]
lame2 = game2[1:len(game2)]
Name = game[0].upper() + lame
Name2 = game2[0].upper() + lame2
#For the names with a Mc in it
if Name2[0:1] == "mc" or "MC":
Last_Name = Mc + Name2[2].upper() + Name2[3:len(Name2)]
#For the names with an O'name in it
elif Name2[0:1] == "O'" or "o'":
Last_Name = O + Name2[2].upper() + Name2[3:len(Name2)]
#For the regular names
else:
Last_Name = Name2
#For the liars
if len(Name) + len(Name2) > 25:
print "STOP LYING!"
#Lets finally print this beast
else:
print "Welcome " + Name + " " + Last_Name + "!"
This is supposed to format names to print them, and when they have a McLastname, it would fix the capitalization, but when I put input any last name, it replaces the first 2 letters with a Mc, even if the name doesn't start with a mc. If I type in a last name such as Smith, it changes it to McIth. Would there be any way to change this so it would only change the first 2 letters to Mc if the name starts with mc or MC? Thanks.