May-11-2019, 04:05 PM
(This post was last modified: May-11-2019, 04:05 PM by sunhyunshine.)
Hello, i have an assignment for python, but i don't know how to start it, if someone helped me i would be really grateful. Since English is not my first language, there may be some errors in the translation of the assignment.
Different lines are stored in the file rows (in the sentences (upper and lower case), numbers, dots, comma, and space symbol). The algorithm writes into a single file the different words found (converted into lowercase letters), the next file - found numbers, and indicates the amount of their recurrence.
Please help me, i will be really thankful.
this is what i have so far:
Different lines are stored in the file rows (in the sentences (upper and lower case), numbers, dots, comma, and space symbol). The algorithm writes into a single file the different words found (converted into lowercase letters), the next file - found numbers, and indicates the amount of their recurrence.
Please help me, i will be really thankful.
this is what i have so far:
def atidarymas(): failas = open("duomenys.txt", "r") duomenys = failas.read() duomenys = duomenys.replace("\n", "") duomenys = duomenys.replace(".", "") duomenys = duomenys.replace(",", "") sar = duomenys.split() failas.close() return (sar) sar = atidarymas()
Attached Files