Parse Command in Python
<p>I have to write a function that takes a string representing a command and its arguments and returns a pair which consists of the command and a tuple containing the commands arguments if it is a valid command with the right number of arguments. Otherwise (None, None) is returned.</p>

<p>This is for a program that loads files, saves to files, adds to files and displays parts of files. </p>

<p>Not sure at all how to go about this, can anyone help?</p>

<p>Thanks!</p>
