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

AI in Manufacturing and Supply Chain Management