mirror of
https://github.com/onestardao/WFGY.git
synced 2026-05-01 21:11:11 +00:00
Create simple_jump.py
This commit is contained in:
parent
3cf29eaa91
commit
35c7412d18
1 changed files with 8 additions and 0 deletions
8
ProblemMap/mvp_demo/jump_table/simple_jump.py
Normal file
8
ProblemMap/mvp_demo/jump_table/simple_jump.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
def jump_example(option):
|
||||
table = {
|
||||
"A": lambda: print("Jumped to branch A"),
|
||||
"B": lambda: print("Jumped to branch B"),
|
||||
"C": lambda: print("Jumped to branch C"),
|
||||
}
|
||||
action = table.get(option, lambda: print("Invalid option"))
|
||||
action()
|
||||
Loading…
Add table
Add a link
Reference in a new issue