What's the best way to think about this? : <p>I am new to python and I have heard a lot about "Pythonic" work arounds to common tasks. I wrote  the following script for a project I'm working on where it needed to pick a random string from a list of strings and break the string into a key and value. The script worked for that purpose but it got me wondering about the way senior developers think about coding. </p>

<p>As a senior developer, how would you think about solving a similar problem?</p>

<ul>
<li><p>What approach would you take in writing this type of script and why? </p></li>
<li><p>How would you decide on the modules to use?</p></li>
<li><p>What did I do wrong or right and why?</p></li>
<li><p>Would you write the code as fast as possible or spend more time on it?</p></li>
</ul>

<p>'''</p>

<pre><code>import random
import re

def add_list(wordlist):
    newword = str(re.split("=", random.choice(wordlist)))
    print(newword)
    output = open('Logfile.txt', 'a')
    output.write("\n" + newword)
    return output

add_list(wordlist = ['1=one', '2=two', '3=three', '4=four',])
</code></pre>

<p>'''</p>
