When you're writing a standalone Python program, it’s a good practice to use a main function. it allows you to easily add some unit tests, use your functions or classes from other modules (if you import them), etc.
If you have to check if some condition is satisfied in case some other condition is not satisfied, and perform some actions depending on which condition is true, you can use an if…elif…else statement.
Also, please note that you cannot use the input() function for your program in this case. What you really want to use here is raw_input. The difference between these two functions is that raw_input() will always return a string and input() will evaluate user’s input as if it was written in your code instead of input(). So, if the user enters "y" (with the quotation marks), then a string object is stored as the value for the variable. But if the user enters y (without the quotation marks), input() will try to evaluate this and an error will be thrown if y is not defined.
You can read more on this subject here.
def main():
while True:
again = raw_input("Would you like to play again? Enter y/n: ")
if again == "n":
print ("Thanks for Playing!")
return
elif again == "y":
print ("Lets play again..")
else:
print ("You should enter either \"y\" or \"n\".")
if __name__ == "__main__":
main()