+ 3
Challenge: How to print the last second indexed value in one line of code without using length function.....?
ex: arr = [1,4,5,80,8,2] output : 8
5 odpowiedzi
+ 3
print(arr[::-2] )
+ 3
print(arr[-2])
+ 2
@Oma Falk, take a look at the code I attached what's the difference.
https://code.sololearn.com/cAU9Z32Jp47c/?ref=app
+ 2
https://code.sololearn.com/cBk4IbXVkE49/?ref=app
+ 1
nice