Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier to read #669

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions episodes/02-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ h
- An item in a list is called an element. Whenever we treat a string as if it
were a list, the string's elements are its individual characters.
- A slice is a part of a string (or, more generally, a part of any list-like thing).
- We take a slice with the notation `[start:stop]`, where `start` is the integer
index of the first element we want and `stop` is the integer index of
- We take a slice with the notation `[start:after]`, where `start` is the integer
index of the first element we want and `after` is the integer index of
the element *just after* the last element we want.
- The difference between `stop` and `start` is the slice's length.
- The slice's length is `after-start`.
- Taking a slice does not change the contents of the original string. Instead,
taking a slice returns a copy of part of the original string.

Expand Down