Replies: 2 comments
-
Since arrays are static, so the length is known. In my case, the array is filled with zero addresses and I don't know which element is the last one. But the problem can be simply solved by adding another parameter. XD |
Beta Was this translation helpful? Give feedback.
0 replies
-
arr[:-1] # complete array access
arr[-1] # last element |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just trying to get the last element from an array. But I can't find a solution to do that. Any good ideas?
Beta Was this translation helpful? Give feedback.
All reactions