Final Poker Game commit

This commit is contained in:
Donald Calloway 2025-09-17 11:22:48 -07:00
parent a30079df3b
commit 231235ba44
3 changed files with 27 additions and 0 deletions

15
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}

Binary file not shown.

12
pop_list.py Normal file
View File

@ -0,0 +1,12 @@
from typing import List, Tuple
Card = Tuple[str, str] # ('Rank', 'Suit')
Hand = List[Card]
def pop_list(lst: List, index: int) -> Tuple:
"""Removes and returns the element at the specified index from the list."""
if index < 0 or index >= len(lst):
raise IndexError("Index out of range")
element = lst[index]
lst.remove(element)
return element