Fixed nbtest.py to prevent duplicated display output