Source Code:
(back to article)
def switch_example(case_value): if case_value == 1: print("Fall 1") elif case_value == 2: print("Fall 2") elif case_value == 3: print("Fall 3") else: print("Standardfall") switch_example(1) # gibt "Fall 1" aus switch_example(2) # gibt "Fall 2" aus switch_example(3) # gibt "Fall 3" aus switch_example(4) # gibt "Standardfall" aus
Result:
Report an issue