Python does not support a switch or case statement. In python, dictionary mapping is there as a replacement of Switch case in Python for Data Science.
So, this way you can write the above code in C++ :
To learn more about dictionaries in python for data science, you can check this and this as well.