A value doesn't print()

Let me take the second part first: the range() function.

That function takes integer values as its arguments, as per the error message.

For your first question: simply assign the return values to two variables: neg_inf, pos_inf = infi()

In fact, I already explained that concept to you, in this thread

I have a question for you: why are you using an abstract concept, namely "inf", for this? Why not use positive integers, until you understand the basic concepts of Python?