from random import randint def Aufgabe2(): #a) farben = ["C", "D", "S", "H"] karten = ["2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"] deck = [] for i in range(4): for j in range(13): deck.append(karten[j]+farben[i]) print(deck) #b) l = len(deck) for i in range(l): neuePos = randint(0,l-1) temp = deck[i] deck[i] = deck[neuePos] deck[neuePos]=temp print(deck) Aufgabe2()