How to get a substring with variable indices

  • Thread starter =?KOI8-R?Q?=F3=D4=C1=CE=C9=D3=CC=C1=D7_=F1=C7=CC=C
  • Start date
?

=?KOI8-R?Q?=F3=D4=C1=CE=C9=D3=CC=C1=D7_=F1=C7=CC=C

Hello all!

I have a string named text. I need to extract a substring from it
starting by variable 's' and ending by 'e'.

text[s:e] generates the following error:

TypeError: slice indices must be integers or None


How to be? :)

Regards, Stanislav Yaglo.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top