int infinity python code example
Example 1: infinity in python
# Defining a positive infinite integer
positive_infnity = float('inf')
print('Positive Infinity: ', positive_infnity)
# Defining a negative infinite integer
negative_infnity = float('-inf')
print('Negative Infinity: ', negative_infnity)
Example 2: python set negative infinity
# Define Negative infinity number
ntive_inf = float('-inf')
print('Negative Infinity: ',ntive_inf)