Simple Python function to extract all the numbers from given text or string

 def getNumberFromRawText(text, serial = 0):

    from re import findall
    numbers = findall(r'\d+', text)
    return numbers[serial]

Comments

Popular posts from this blog

Apple iPad Air (2022) Specifications and Review in 2023

17-year-old suspect in fatal stabbing at Taylor Swift-themed dance event ID’d

Exercise vs Diet