0

I have this list:

rateLimit[0] =  ((Decimal('3445'),(Decimal('65655'),(Decimal('3765'))

I only need the numbers : 3445 , 65655 , 3765

Is there a way out other that rstrip and lstrip.

Currently I am doing :

myStr = str(rateLimit[0])

mystr = myStr.lstrip("(Decimal('")

mystr = mystr.rstrip("'),)")

Is there a more Pythonic way to do so?

AvidLearner
  • 4,123
  • 5
  • 35
  • 48
Shruti Srivastava
  • 378
  • 1
  • 6
  • 26

0 Answers0