-3

I'm trying to code a program that give IPs information. When I try to get the IP by input and run it appears SyntaxError: invalid syntaxit just let me put strings on it. Here is my code:

 def _get_ip():
    ip = ''

    _get_ = input('What\'s the IP?: {}'.format(ip))

_get_ip()
Sam P
  • 1
  • 1

1 Answers1

0

In Python 2, input tries to evaluate the string you enter. Use raw_input instead.

Ned Batchelder
  • 364,293
  • 75
  • 561
  • 662