Demo entry 6762463

1

   

Submitted by anonymous on Oct 15, 2018 at 07:30
Language: Python. Code size: 303 Bytes.

class Node:
    '''
    data:数据 value
    next:下一个节点
    '''

    def __init__(self, data, pnext=None):
        self.data = data
        self.next = pnext

    def __repr__(self):
        '''
        定义该类的输出,类似java的toString()方法
        :return:
        '''
        return str(self.data)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).