Computer Science, asked by navneet6439, 1 year ago

Write a function which returns a substring in the string 'sigma' (character given)which starts wit 'alpha' and ends with 'thita'

Answers

Answered by shlokmishra1
0

 \sin( \cot( \sec(?) ) )
Answered by pavithranatarajan855
0

Answer:

method 1(if alpha and thita is str)

def sub(a,b,c):

 l1=a.find(b)

 l2=a.find(c)

 return(a[l1:l2+1])

sigma=input()

alpha=input()  #here alpha and theta is string

thita=input()

print(sub(sigma,alpha,thita))

method 2(if alpha and thita is int)

def sub(a,b,c):

 return(a[b:c+1])

sigma=input()

alpha=int(input())

thita=int(input())

print(sub(sigma,alpha,thita))

Explanation:

Similar questions