擅长:python、mysql、java
<pre><code>outfile = open("literatur_comma.txt", "w")
for line in open("literatur_semicolon.txt", "r"):
if line.startswith('keywords'): # starts with "keywords" replace all semicolon with comma
outfile.write(line.replace(';',',')) # write in new file
outfile.close()
</code></pre>