Skip to content
On this page

2021년07월27일

On this page

Note

JavaScript

Python

  • 파일 읽기, 쓰기
    with open('filename', 'r') as original: title = original.readline()
    with open('filename', 'r') as original: data = original.read()
    yaml = "---\ntitle:" + title.replace("#", "") + "\n" + "---\n"
    with open(root + "/" + file, 'w') as modified: modified.write(yaml + data)

log

LINKS TO THIS PAGE

Edit this page
Last updated on 8/13/2022