I'm trying to do something like this. One can import something like:
from random import randint
and then later assign it like:
x = randint()
and what I'm trying to do is try to find a way to dynamically set any value:
var x = myint
and use that VALUE to assign to the class instead... like
(the value of x) = randint()
so if you printed:
print(type(myint))
you'd see:
>>> (class random.randint)
Not sure if I'm making any sense but...in php, one just has to do something like @x to make it use the value of the variable and not just reassign the variable. So it would end up like:
x= "myvar"
@x = randint()
print(type(myvar))
>>> (class random.randint)
and then be able to do whatever you wanted later like:
new_int = myvar.randint(0, 50)
Something like that...is what I'm shooting for even possible?