Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Semrush - keyword research tool

Linux Foundation Training and Certification

Teach Your Child To Read

Disclosure: My content contains affiliate links.

32,310 questions

42,485 answers

573 users

How to create 2D list (matrix) in Dart

1 Answer

0 votes
import 'dart:io';

void main() {
    List<List<int>> matrix = [  [0, 2, 4, 6, 1], 
                                [1, 5, 4, 1, 1], 
                                [7, 1, 0, 8, 0], 
                                [9, 3, 8, 1, 1]  ];
                                    
    stdout.write(matrix);
}




/*
run:

[[0, 2, 4, 6, 1], [1, 5, 4, 1, 1], [7, 1, 0, 8, 0], [9, 3, 8, 1, 1]]

*/

 



Learn & Practice Python
with the most comprehensive set of 13 hands-on online Python courses
Start now


answered Apr 18, 2023 by avibootz

Related questions

2 answers 64 views
1 answer 43 views
43 views asked Oct 9, 2022 by avibootz
1 answer 44 views
44 views asked Oct 9, 2022 by avibootz
...