how to access an element of nested list with a loop? like:
a = [20,[22,[3,[21]]]] #^^ i want to access this
how to access it with a loop, insead of using
a[1][1][1][1]
any solution on any language is accepted (preferably python)
https://stackoverflow.com/questions/67394269/how-to-access-an-element-of-a-nested-list-with-loop May 05, 2021 at 10:04AM
没有评论:
发表评论