Suppose we have a long string, for example:
s = "The long-string instrument is a musical instrument in which the string is of such a length that the fundamental transverse wave is below what a person can hear as a tone."
Now, We all know how to extract from this string letters based on indexes:
z = s[18:26]
print(z)
strument
But is there any way, how I can assign this indexes to a variable, and then subset the list based on this variable? It should look something like that:
z = [18:26]
print(s.z)
strument