Posts by Rodrigo Almeida • 9 points
2 posts
-
-1
votes4
answers405
viewsA: Search a specific line in a . txt file and change the content
Bro when you use the with open('archival', 'w'....) This 'w' overwrites the TXT file, you need to use 'a' as it concatenates the file... Thus: with open('seuseufile.txt', 'a') as file:…
-
0
votes2
answers1588
viewsA: Data structure representing a deck of cards
One way I found was to make only a list with the value of the cards like this: baralho = ['A♥', 'K♥', 'Q♥', 'J♥', 'T♥', '9♥', '8♥', '7♥', '6♥', '5♥', '4♥','3♥', '2♥','A♠', 'K♠', 'Q♠', 'J♠',…