I used [::3] but it didnt work its correct btw | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
- 1

I used [::3] but it didnt work its correct btw

8th Oct 2021, 2:08 PM
Sepehr Ayobi
Sepehr Ayobi - avatar
3 Respuestas
0
a = [1,2,3,4,5,6] b = a[::3] #Out: [1,4] This is how it works. 3 is step.
8th Oct 2021, 2:28 PM
Arsalan [Inactive]
Arsalan [Inactive] - avatar
+ 2
You must not have it correctly if it didn’t work. Please post your code or a real question if you would like help.
8th Oct 2021, 2:15 PM
Jibraeel Abdelwahhab
Jibraeel Abdelwahhab - avatar
+ 1
Thats it thanks
8th Oct 2021, 2:30 PM
Sepehr Ayobi
Sepehr Ayobi - avatar