Python: Write a list to a text file and show as a list
<p>I just started to program in Python with the help of <a href="http://www.swaroopch.org/notes/Python" rel="nofollow">'A byte of Python'</a> and this site which helped me a lot. My task is to find all the <a href="http://en.wikipedia.org/wiki/Hiragana" rel="nofollow">Hiragana</a> symbols in a string of Japanese words. 
The output should be a text file with all Hiragana sequences stacked in a list.
Given to me was the following code:</p>

<pre><code># -*- coding: utf-8 -*-
import re
import codecs  

prompt = unicode('alotofjapanesesymbols')
out = codecs.open("output.txt", "w", "utf-8")

#Japanese uses 4 major writing systems that are intermixed in Japanese texts.
#Your task is to find all connected sequences of Hiragana symbols in the
# "prompt" Unicode string above and write them out into separate lines
# using the file handle "out".
# The result should be 40 lines looking like this (excluding the # symbol):
#な
#や
#に
#されている
#はその
Etc.
</code></pre>

<p>Thus far i came to this:</p>

<pre><code># -*- coding: utf-8 -*-

import re
import codecs

s = '受信可能な放送局や、リストに登録されている放送局はその放送局の名前をお使いいただけます 例えばFMヨコハマが受信可能な場合放送局FMヨコハマと言うことでFMヨコハマをお聞きいただけます アドレス帳の検索は音声コマンド登録先を検索のあとに登録されているお名前をお話しください アドレス帳に登録されている方に電話をするときは例えばアドレス帳の鈴木太郎に電話するとお話しください 音声コマンドが認識されにくい場合は同じコマンドを繰り返すかヘルプシステムをご利用ください'

m = re.findall(u'[\u3040-\u309F]', s.decode('utf-8')) # Using regular expressions findall function and unicode of all Hiragana symbols to find them. 

# for char in m:                     
#     print char, hex(ord(char))  # For every character in m, print the character and its unicode using the ord function (unicode is hexadecimal). This is not relevant, but it showed me that i am on the right way.

out = codecs.open( 'output.txt', 'w', 'utf-8' ) 
for char in m:
    out.write(char)
else: 
    out.close()         # Write the Hiragana symbols to a text file as long as there are characters in m, else close file. 
</code></pre>

<p>The most difficult was the whole unicode-utf-8-encoding-decoding part, but i liked the feeling after i found out how to find the Hiragana symbols using the re.findall function and unicode of Hiragana.
The problem i am facing now is, that i have a text file with all the symbols, but they are shown in a string and not in a list. What am i doing wrong and can you help me out?
I went already through several topics but that didn't help for me.
Thanks for the help you already gave me on this site.</p>

<p>zawaponga</p>
