How to find the position (index) of a list inside a tuple of tuples and lists with Python

1 Answer

0 votes
tpl_tpl = ('a', ('b', 'c'), ('a', 'b'), ('x', 'y'), [5, 6, 7], [9, 8])

index = tpl_tpl.index([9, 8])

print(index)



'''
run:

5

'''

 



answered Dec 25, 2019 by avibootz

Related questions

1 answer 159 views
2 answers 146 views
1 answer 187 views
...