what is float('inf') code example Example 1: float infinity python a = float('inf') Example 2: float('inf') float('inf') float('-inf')