def test_out(lst): lnkd_lst = LinkedList() test_str = '' for i in lst: lnkd_lst.append(i) test_str += f'{i} ' assert lnkd_lst.out() == test_str