Would regex be the better way to write code involving words and sentences?
<p>I want to define a function that takes a sentence and returns the words that are at least a length of 4 and in lowercase. The problem is, I pretty new to Python and I'm not quite certain on how to make code dealing with words instead of integers. My current code is as follows:</p>

<pre><code>def my_function(s):
    sentence = []
    for word in s.split():
        if len(word) &gt;=4:
            return (word.lower())
</code></pre>

<p>If I <code>my_function("Bill's dog was born in 2010")</code> I expect <code>["bill","born"]</code> where as my code outputs <code>"bill's"</code>
From what I've seen on StackOverflow and in the Python tutorial, regular expression would help me but I do not fully understand what is going on in the module. Can you guys explain how regex could help, if it can at all?</p>
