You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
333 B
22 lines
333 B
2 years ago
|
import glob
|
||
|
|
||
|
def readfile():
|
||
|
read_path = glob.glob(f"*.txt")
|
||
|
return read_path
|
||
|
|
||
|
nama_log = f"{readfile()}"
|
||
|
|
||
|
#print(nama_log)
|
||
|
|
||
|
with open(nama_log, 'r') as f:
|
||
|
lines = f.read().splitlines()
|
||
|
|
||
|
for line in lines:
|
||
|
x1 = line.split(": ")
|
||
|
twit_sent = x1[1]
|
||
|
sum += int(twit_sent)
|
||
|
print(f"{twit_sent}")
|
||
|
|
||
|
|
||
|
|
||
|
#print(list)
|