Zählprogramm etc

This commit is contained in:
Sven Riwoldt
2025-04-21 07:56:45 +02:00
parent 38d0550626
commit 14eecf2c70
9 changed files with 1008 additions and 2 deletions

28
mp3/Vergleich.py Normal file
View File

@@ -0,0 +1,28 @@
import os
tmp = []
filenames = []
with open('Uebersicht_der_Wörter_20250419.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)