float input python code example
Example 1: input float python
# python code to take float input
val = float(input("Enter any number: "))
print("value of val2: ", val)
print("type of val2: ", type(val))
Example 2: how to take list of float as input in python
float_list = list(map(float, input().split()))