 <p>Python's print statement displays the string representation of an object. So if it prints as 'h1' (without the quotes), you could try testing if that is the object's string representation :</p> <pre><code>if str(h) == 'h1': servpro() else: hostpro() </code></pre>