This section if for completed scripts.
However...
I presume that you want this:
However...
I presume that you want this:
def get_hostname(): response = raw_input("Please enter your name: ") body = '[{"hostname": response}]' # without the quotes response will contain the input. Do you want body to be a string? return bodyThe print function returns None. Do not use it that way but just for output. Print is a function in Python 3. You are using raw_input which is deprecated in v3.x. Just input works the same way as raw_input in Python 3.