Please help me to use python write this question thanks This

Please help me to use python write this question, thanks.

This function receives a string s and a number n which describes the number of parenthesis to place on the left and right of the old string to form a new string that should be returned. Use iteration to solve this!

Solution

>>> x, y = \'2(3.9)\', \'12(8.5)\' >>> def extract( s, start=\'(\', stop=\')\'): return string[s .index(start)+1:s.index(stop)] >>> extract(x), extract(y) (\'3.9\', \'8.5\')
Please help me to use python write this question, thanks. This function receives a string s and a number n which describes the number of parenthesis to place on

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site