Skip to content
Advertisement

What is the python code equivalent of slicing a list in dart other than using the SUBLIST method?

I understand that the sublist method works similar to slicing, but what are some other ways i can get similar outputs?

For example

List = [1,3,5,7,9]

Python code ListSliced = List[1:]

Using sublist in dart ListSliced = List.sublist(1);

Is there a equivalent of List[1:] in DART??

JavaScript
JavaScript

Any ideas on whats causing this error

Full code for the tree program.

JavaScript

Advertisement

Answer

Another way is to use skip

For example:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement