0
What is this: [:index]
In this section it has new code not covered yet I guess. [:index] how does this work?
1 ответ
+ 2
It means from the beginning till "index" excluding the index so for example if I have
a = "12345678"
print(a[:5])
It will print a starting from index 0 to index 4, leaving the output like this:
12345