Posts by user130853 • 56 points
1 post
-
4
votes1
answer238
viewsA: Slicing String and Saving the Slices in a PYTHON List
You can use slicing to access slices of an array (or string). nome[0:3] returns "Gui" nome[3:6] returns "you" And so on and so forth. nome = "guilherme" lista = [nome[i:i+3] for i in range(0,…