About slicing

4 important questions on About slicing

For what can you use begin and end indices?

[0:5]

When you want to get a few elements out of a list.

Which two options get the last element A of data in this code snippet?


1
-1
11
0
12
-0

-1, 12

How can you directly look for the colon(:) and read the remaining string?

With the .find() function. .fInd()  returns the position of a string in another string.
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

What does the strip() function do?

It removes all characters from the beginning and the end of the string.

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo