Input from text file (Eg: [[1,2],[3,4]]) into 2d list in python

Input from text file (Eg: [[1,2],[3,4]]) into 2d list in python

I have an input dataset in .txt format which looks like,

I have an input dataset in .txt format which looks like,

[[1, 2, 3], [4, 5, 6]]


[[7, 8, 9], [10, 11, 12]]

How do I read it into a 3-d python list where the first index is the line no. such as,

list[0][0][0] = 1


list[1][1][2] = 12

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Top Python Development Companies | Hire Python Developers

After analyzing clients and market requirements, TopDevelopers has come up with the list of the best Python service providers. These top-rated Python developers are widely appreciated for their professionalism in handling diverse projects. When...

Python GUI Programming Projects using Tkinter and Python 3

Python GUI Programming Projects using Tkinter and Python 3

Guide to Python Programming Language

Guide to Python Programming Language