mytype = "int"
myvalue = "35"
my_int_val = mytype(myvalue)
This throws up -
TypeError: 'str' object is not callable
I can't seem to remember the way to do so. Any ideas?
Please note that I have to use "str", "int" instead of str or int (without quotes), because I am getting this value from somewhere else where it's being passed on as a string.