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?

omerbp
  • 3,973
  • 4
  • 31
  • 47
Shruti Srivastava
  • 370
  • 1
  • 5
  • 26

0 Answers0