2 Answered Questions for the topic switch statement

Switch Statement Python


Replacements for switch statement in Python?

I want to write a function in Python that returns different fixed values based on the value of an input index. In other languages I would use a `switch` or `case` statement, but Python does not... more
Switch Statement Logic C# .net


Multi-variable switch statement in c#?

I would like use a switch statement which takes several variables and looks like this: switch (intVal1, strVal2, boolVal3) { case 1, "hello", false: break; case 2, "world", false: break; ... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.