반응형
filename = './Lotto645.csv'
f = open(filename, 'r')
fw = open('./Lotto645_insert.sql', 'wt')
for i in range(45):
fw.write('insert into T_LOTTO645NUM values (' + str(i+1) + ');\n')
fw.write('\n')
while True:
line = f.readline()
if not line: break
fw.write('insert into T_LOTTO645 (ROUND, NO1, NO2, NO3, NO4, NO5, NO6, NO7) values (' + line.strip() + ');\n')
fw.close()
f.close()
반응형
'Programming > Python' 카테고리의 다른 글
[Python] TensorFlow(2.13) Installation (Ubuntu, Nvidia GPU, + PyTorch) (0) | 2023.07.26 |
---|---|
[Python] Jupyter Notebook Remote Configuration (0) | 2023.01.31 |
[Python] TensorFlow(2.11) Installation (Ubuntu, Nvidia GPU, + PyTorch) (1) | 2022.11.10 |
[Python] TensorRT Installation(tar file) (0) | 2022.10.31 |
[Python] 필수 Library/Tools 설치(user mode) (0) | 2022.10.30 |