Try with.. [Python
Substring](http://net-informations.com/python/basics/substring.htm)
More on... [Python
Substring](http://net-informations.com/python/basics/substring.htm)
Python has no
[substring](http://net-informations.com/python/basics/substring.htm) methods
like substring() or substr(). Instead, we use slice syntax to get parts of
existing strings. Python slicing is a computationally fast way to methodically
access parts of your data. The colons (:) in subsc
Anyone familiar with Python (the most commonly taught introductory programming
language, and, most importantly,
[esr-approved](http://catb.org/~esr/faqs/hacker-howto.html)) should be used to
to [negative
indices](http://wordaligned.org/articles/negative-sequence-indices-in-python).
(Nim has go
A friend found this recently, so I will update this to `[6 ..< test.len]`, i.e.
use the ..< operator instead of bare `<`.
There is also system.substr()
I recommend the `^` operator. The `^` operator works in all bracket expressions.
proc main() =
var test = "Hello World"
echo test[5 .. ^1]
# this is transformed by the compiler to this expression
echo test[5 .. (len(test)-1)
# 1 here can be any symbol and
(I found this by google search.)
That doesn't crash, but more correct is `[6 ..