Skip to content

Instantly share code, notes, and snippets.

@Nandhakumarpro
Created February 18, 2021 09:31
Show Gist options
  • Save Nandhakumarpro/40e70f770df7b40652e0d4706bfa74f3 to your computer and use it in GitHub Desktop.
Save Nandhakumarpro/40e70f770df7b40652e0d4706bfa74f3 to your computer and use it in GitHub Desktop.
nigandium requirements 1
def str_from_file(file_name):
with open(file_name, "r") as f :
r = f.read()
return r
def process_str( inp_str ):
outp_str = inp_str.replace( ", " , ',') .replace ( '@ ', "+").replace( " ","\n").replace( "+" , " = ").replace(',', ', ')
return outp_str
def str_to_file( str_, file_name) :
with open(file_name, "w") as f:
f.write( str_ )
if __name__ == "__main__":
str_to_file ( process_str( str_from_file ('test-input.txt') ), "test-out.txt" )
கடு@ நஞ்சு, முள்ளு, கடுமரம், கசப்பு படு@ மரக்கொத்து, மது, குளம், நன்மை படுதல்@ சாதல், சத்தமின்மை, உண்டாகுதல், அலர்தல் மடை@ சலதாரை, சோறு, துவாரம், ஆபரணக்கடைப்பூட்டு படை@ படையாயுதம், உழுபடை, நித்திரை, குதிரைச்சேணம், யுத்தம், சேனை
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment