#! /usr/bin/env python
# coding:utf-8


if __name__ == '__main__':
    from sys import argv
    fd = open(argv[1])
    for line in fd:
        line = ' '.join(line.rstrip())
        line = line.replace(" , ", ",")
        print(line)

@@ -88,31 +88,39 @@
 argv
-%0A    fd = open(
+, stdin%0A    delimiter = 
 argv%5B1%5D
-)
 %0A   
@@ -136,10 +136,13 @@
  in 
-fd
+stdin
 :%0A  
@@ -212,16 +212,54 @@
 e(%22 
-, %22, %22,%22
+%7B%7D %22.format(delimiter), %22%7B%7D%22.format(delimiter)
 )%0A  

Update argv: add delimiter