Loading...
Convert values between different Python types.
Python provides built-in functions for type conversion:
Write a function convert_value(value, target_type) that converts the value to the specified type.
Return the converted value, or "Error" if conversion fails.
value = "42", target_type = "int"
42
int("42") converts the string "42" to integer 42