How do you get the 10 last elements of a list?

I'm stupid, please help

my question doesn't require blocks I think. i just wanna know how to get last 10 elements in list, like list[-10:] in python

The Python slice operator doesn't translate well into most languages, including App Inventor. Here are three variations for a procedure you could use to get a sublist from the end of a list. The first one is probably "closest" to what Python is doing internally whereas the second is probably the most "App Inventor"-y since its internal representation is Scheme.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.