In Python, when I type sys.platform on the Mac OS X the output is \"darwin\"? Why is this so?
Because the core of Mac OS X is the Darwin OS.
Quoting from the linked WikiPedia page:
Darwin forms the core set of components upon which Mac OS X and iOS are based.
Even the OS X platform itself reports itself as "Darwin" when you ask it:
$ uname
Darwin
Python merely uses that same platform identifier.