In Python, what is the difference between an open file and a socket?

All QuestionsCategory: NetworksIn Python, what is the difference between an open file and a socket?
Chetan Shidling Staff asked 4 years ago

Options:

  1. When you open a file, you get a read and write handle to allow simultaneous operations
  2. A program can rewind a socket and start writing again at the beginning of the socket
  3. A program writes to a socket, it can read its data back after closing the socket
  4. A socket can be simultaneously read and written