Write a Python program to get the name of the host on which the routine is running
I have used python 3.7 compiler for debugging purpose.
import socket host_name = socket.gethostname() print() print("Host name:", host_name) print()
Result:
Host name: TECHSTUDY-PC
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
I have used python 3.7 compiler for debugging purpose.
Result:
Host name: TECHSTUDY-PC
need an explanation for this answer? contact us directly to get an explanation for this answer