Skip to main content
Just following pep8 naming practices since this has high exposure to beginners
Source Link
wihlke
  • 3k
  • 1
  • 23
  • 20

A common way to achieve this is by string slicing.

MyString[amy_string[a:b] gives you a substring from index a to (b - 1).

A common way to achieve this is by string slicing.

MyString[a:b] gives you a substring from index a to (b - 1).

A common way to achieve this is by string slicing.

my_string[a:b] gives you a substring from index a to (b - 1).

Active reading.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

A common way to achieve this is by Stringstring slicing.   

MyString[a:b] gives you a substring from index a to (b - 1).

A common way to achieve this is by String slicing.  MyString[a:b] gives you a substring from index a to (b - 1)

A common way to achieve this is by string slicing. 

MyString[a:b] gives you a substring from index a to (b - 1).

Fix bug: index `b` is not included in the slice
Source Link
UltraInstinct
  • 44.6k
  • 12
  • 85
  • 108

A common way to achieve this is by String slicing. MyString[a:b] gives you a substring from index a to b(b - 1)

A common way to achieve this is by String slicing. MyString[a:b] gives you a substring from index a to b

A common way to achieve this is by String slicing. MyString[a:b] gives you a substring from index a to (b - 1)

Better formatting
Source Link
Endophage
  • 21.6k
  • 13
  • 62
  • 93
Loading
Source Link
codingscientist
  • 1.2k
  • 1
  • 11
  • 12
Loading