+ 2
How do I display the text that the slice function “sliced?” from a variable
I’m a fairly new python programmer and I just learned the slice function. How would I print the text from that. (Sorry, I’m not good at explaining things.)
2 odpowiedzi
+ 2
I think: print(put your slice command here)
This is a sample from the python course:
squares = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
print(squares[2:6])
print(squares[3:8])
print(squares[0:1])
+ 1
^^ Thank you!