PHP var_dump is used to get detailed information regarding variables their type and value. To achieve same in python we can use type() function to get the datatype of the variable.
Code:
def var_dump(var):
print(f” Type:{type(var}, Value:{var}”)
var_dump(23.02)
var_dump(‘hello’)
--Type: float, Value:23.02
--Type:string, Value:’hello’
Function call will display the type of the variable along with the value