Files
txt2apkg/mp3/Vergleich.py
Sven Riwoldt 79bfb7e81b 21.04.25
2025-04-21 16:21:02 +02:00

28 lines
698 B
Python

import os
tmp = []
filenames = []
with open('Uebersicht_der_Wörter_20250421.txt', 'r', encoding='utf-8') as input_file:
for line in input_file:
#Erzeuge ein Array mit den Wörtern
tmp.append(int(line.split('\t')[0]))
#Einlesen eines Ordners
for root, dirs, files in os.walk("."):
for file in files:
if file.endswith(".mp3"):
filenames.append(int(file.split('-')[0]))
def vergleichen(a, b): # Vergleichsfunktion
if a not in b:
return a
# Vergleichen von tmp und filenames, was nicht enthalten ist wird ausgegeben
for i in tmp:
#print("i: ",i)
#print(vergleichen(str(i), filenames))
if i not in filenames:
print (i)