Skip to content

Instantly share code, notes, and snippets.

@ilkermanap
Created March 8, 2020 15:55
Show Gist options
  • Save ilkermanap/8fe6ae3ce2466b4b2a55ee5aee6c9157 to your computer and use it in GitHub Desktop.
Save ilkermanap/8fe6ae3ce2466b4b2a55ee5aee6c9157 to your computer and use it in GitHub Desktop.
ozel istek uzerine basit uygulama
harita = open("hastamap.txt","r").readlines()
def ekle(girdidosyasi, id, ciktidosyasi):
satirlar = open(girdidosyasi, "r").readlines()
f = open(ciktidosyasi, "a")
for satir in satirlar:
f.write(f"{id},{satir}")
f.close()
for satir in harita:
dosya, id = satir.strip().split()
ekle(dosya, id, "cikti.txt")
1,2,3,1,2
3,2,1,2,3
1,2,3,1,2
3,2,1,2,3
1,2,3,1,2
3,2,1,2,3
hasta1.txt 101_hasta1
hasta2.txt 102_hasta2
hasta3.txt 103_hasta3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment