A = [10, [20, [30, None]]]
A[1][1][1] = A #зацикливание списка
def print_list(A):
    p = A
    while p: #!=None
        print(p[0])
        p = p[1]
print_list(A)

1e8f6a2c67089ebf7562e9863ae2d7bacd19e118
<mask token>

<mask token>


def print_list(A):
    p = A
    while p:
        print(p[0])
        p = p[1]


<mask token>

<mask token>


def print_list(A):
    p = A
    while p:
        print(p[0])
        p = p[1]


print_list(A)

A = [10, [20, [30, None]]]
A[1][1][1] = A


def print_list(A):
    p = A
    while p:
        print(p[0])
        p = p[1]


print_list(A)

A = [10, [20, [30, None]]]
A[1][1][1] = A #зацикливание списка
def print_list(A):
    p = A
    while p: #!=None
        print(p[0])
        p = p[1]
print_list(A)
