logo-MindMajix
PostPythonPython
i
irfan mohammad

Posted on 23rd June 2024|30 views

0
votes

How Do I Get A Substring In Python?

What is the process of getting a substring in python

1 answers
Answers
P
jordan chris

Posted on 23rd June 2024| views

I can explain to you by using the below example:

  nin_string = 'xbzefdgstb'

  print ("the initial_string : ", nin_string)

  sstring = nin_string[2:7:2]

  print ("the resultant substring", sstring)

 

Output:

the initial_strings : xbzefdgstb

the resultant substring zfg

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number