Time function with arguments in python
<p>I have a function with a string as an argument that returns two lists</p>

<p>e.g.</p>

<pre><code>def return_words(string):
    return list1, list2
</code></pre>

<p>Obviously there's code in between. I want to be able to time this function accurately for various strings as I need to improve efficiency when long strings are inputted.</p>

<p>Sorry if this is a trivial question as I am new to python.</p>

<p>Thanks</p>