2025-01-09T14:30:26

This commit is contained in:
2025-01-09 14:30:26 +09:00
parent 90d9816ea2
commit a6be4b4c30
18 changed files with 941 additions and 0 deletions

17
src0/switch.py Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/python
def function_1():
return 1
def function_2():
return 2
def function_3():
return 3
switch = {1:function_1, 2:function_2, 3:function_3}
val = 2
function = switch[val]
result = function()
print(result)