Casting has nothing to do with Harry Potter - sorry! It does do a type of magic - It can change one type of data into another!
float(x) - Converts x to a floating-point number. str(x) - Converts object x to a string representation. float(x) - Converts x to a floating-point number.