Final Poker Game commit
This commit is contained in:
parent
a30079df3b
commit
231235ba44
15
.vscode/launch.json
vendored
Normal file
15
.vscode/launch.json
vendored
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
__pycache__/playing_cards.cpython-313.pyc
Normal file
BIN
__pycache__/playing_cards.cpython-313.pyc
Normal file
Binary file not shown.
12
pop_list.py
Normal file
12
pop_list.py
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user