8/13 Why not use input() instead of raw_input()


Hello everyone, in the instructions of exercise 8 of Python Battleship, it says to use raw_input() when you want an integer. I was wondering if there was a reason to use that instead of input()?

For example:

guess_row = input("Guess Row: ")
guess_col = input("Guess Col: ")
guess_row = int(raw_input("Guess Row: "))
guess_col = int(raw_input("Guess Col: "))
#should serve the same purpose, just with less code in the first.


input() should be for python 3 while raw_input() for python 2 and codecademy.com is based on python 2.

If you also notice, in python 3, you have to include a bracket to target print which is not so in python 2.

Hope this helps.