I'm kinda new to Python, and building a card game. This question may be easy for a lot of people.
dealerCom = []
for subset in combinations(dealer_deck, 4) :
dealerCom.append(str(dealer_card) + str(subset))
for hands in dealerCom :
hands.replace(',', '')
print(dealerCom[1819])
print(dealerCom[1819].replace(',', '') )
First print statement returns KC ( 9D , 5H , AH , TD ) Second print statement properly returns KC ( 9D 5H AH TD )
Trying to format out using the second for loop, however nothing inside it seems to work. The second print statement does however format somehow.
- dealer_card is a object list [val= KC]
- dealer_deck is a object list that we are finding combinations of [val= TS 9S 8C 5D AC JH 7D QC KH 6S JD 2S 9D 5H AH TD]
- Objective is to copy dealerCom list into a .txt file eventually using AB CD EF GH single space formatting, data only on 1820 individual lines
- The str() conversion might seem weird, I was debugging a lot and that's the only thing that helped me actually print dealerCom[1819]