Faylda probelli 2 ta son bor uni oqib yangi faylga yigindini yozish


Download 13.17 Kb.
Sana19.09.2023
Hajmi13.17 Kb.
#1681636
Bog'liq
Faylda probelli 2 ta son bor uni oqib yangi faylga yigindini yozish


Faylda probelli 2 ta son bor uni oqib yangi faylga yigindini yozish

f = open('C:\input.txt', 'r')


l = f.read()
indexl = l.index(' ')
a = str(int(l[:indexl]) + int(l[indexl +1:]))
f1 = open('C:\output.txt', 'w')
f1.write(a)
Download 13.17 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling