factorial

This commit is contained in:
Rohit Tanwar
2018-01-27 11:03:02 +05:30
parent 94a4c53868
commit b5a1fa18ba
17 changed files with 31 additions and 91 deletions

View File

@ -11,7 +11,7 @@ for file in files:
originalCode = re.search(codeRe,fileData).group(0)
#print(re.split(codeRe,fileData)[0])
formatedCode = autopep8.fix_code(re.split(codeRe,fileData)[1])
fileToSave = fileData.replace(originalCode,('```python \n'+formatedCode+'\n```'))
fileToSave = fileData.replace(originalCode,('```python'+formatedCode+'```'))
someFile = open("snippets/"+file,'w')
someFile.write(fileToSave)
someFile.close()