1
Listing
>>> convites = ['Flavio Almeida', 'Nico Steppat', 'Romulo Henrique']
when you show it, it comes like this
>>> convites[0]
'Flavio Almeida'
>>> convites[1]
'Nico Steppat'
>>> convites[2]
'Romulo Henrique'
I believe you are correct, because of this;
posição 0 1 2
>>> convites = ['Flavio Almeida', 'Nico Steppat', 'Romulo Henrique']
because Flavio is in position 0, Nico is in position 1 and Romulo in position 2
because when printing two positions it behaves differently, as shown below?
>>> convites[0:2]
['Flavio Henrique', 'Nico Steppat']
In my opinion it should be
['Flavio Henrique', 'Romulo Henrique']
I don’t understand, can someone explain to me?
An even better option for not having to set in hand is to use: invitations[:Len(invitations)] from 0 to the number of elements, since the index always starts at 0 the number of elements is always index+1.
– ooredroxoo