I'd like know if there is a quick way to accept data types as a user input directly so I can use it directly to cast type on other variables?
I am not looking for conditionals or for loops to check for all possible options.
Thanks for the help in advance.
ex:
data_type = input('Enter a data type: str , bool, int or float: ')
user enters: str
I use datatype variable to change an integer to string type: datatype(234)