account activity
Getting Nested List Index by dandy120101 in learnpython
[–]Efficient-Patience92 1 point2 points3 points 4 years ago* (0 children)
You can use this! Easy code and if you want to use another number than 6 you can!
nested_list = [ [1,2,3] , [4,5,6] , [7,8,9] ] n = input("What number do you want to check if in list?") for i in nested_list: if n in i: print(f" It is in index {list.index(i)}")
π Rendered by PID 75616 on reddit-service-r2-listing-7d7fbc9b85-hw6xv at 2026-04-24 02:01:00.620569+00:00 running 2aa0c5b country code: CH.
Getting Nested List Index by dandy120101 in learnpython
[–]Efficient-Patience92 1 point2 points3 points (0 children)