samquar
samquar

Reputation: 155

How to deal with several number in camel case?

I have a variable like model_1_5_7 and I need to rename it in camel case. I need it because earlier my models were functions in Python but now I need to make them as classes.

Upvotes: 2

Views: 1084

Answers (1)

August Karlstrom
August Karlstrom

Reputation: 11377

You could use a letter instead of the underscore, for instance p (for point), which would give model1p5p7. If the module numbers are dense you could also use a three-dimensional array named models and designate the individual models with three indices, for example models[1][5][7].

Upvotes: 1

Related Questions