Was hlältst du davon?

import random

lottozahlen = random.sample(range(1,10),4)

computertipp = random.sample(range(1,10),4)

count = 0

print(lottozahlen)

input()

while lottozahlen != computertipp:

  print(computertipp)

 for zahl in lottozahlen:

    if int(zahl) in lottozahlen:

      count += 1

  computertipp = random.sample(range(1,10),4)

print("Geschafft, die richtigen Zahlen sind:",lottozahlen, computertipp,)

print("Anzahl der Berechnungen:", int(count/4))

...zur Antwort