Python Programming - Standard Libraries - Discussion
Discussion Forum : Standard Libraries - General Questions (Q.No. 81)
81.
What is the purpose of the
socket
module?
Answer: Option
Explanation:
import socket
# Example usage of socket module for creating a simple server
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_socket.bind(('localhost', 8080))
server_socket.listen(1)
connection, address = server_socket.accept()
print(f"Connected by {address}")
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers