### Extract numbers from a random string and sum them

I came across a link to this simple problem while I was surfing SO, listed here, and thought I'd write a pretty complete little script in Python 3.
#! /usr/bin/env python3.4
# -*- coding: utf-8 -*-

""" Extract numbers from a string and sum them """

import re
import random
from string import ascii_lowercase, digits

def randomString(length: int =0) -> str:
""" generate a random string with ascii digits and characters """
base = ascii_lowercase + digits
return ''.join(random.choice(base) for _ in range(length))

def sumNumbers(string: str ='') -> int:
""" Sum numbers in a string """
numbers = re.findall('[1-9]+', string)

# show it
print('Numbers: ', end='')
for n, num in enumerate(numbers):
numbers[n] = int(num)
print(num, end=' ')
else:
print()

return sum(numbers)

if __name__ == '__main__':
print('Total Sum:', sumNumbers(randomString(length=100)))

I think these functions demonstrate how awesome Python is at manipulating text data. I mean, sure, this is just a simple problem, and Python allows us to solve it with simple and easy-to-read code.

Also, as a side note, I discovered that there was some debate around 2005 about whether the reduce function should be removed from Python 3, not to mention  map and filter. For instance, this article by Guido van Rossum, who is the creator of Python. It was an interesting read, and I understand the motivation - that these are only really applicable for situations that may be too specific, and hence not common, or rather only certain kinds of operators/functions - but I enjoy using them in my own code (then again, that may be my bias toward mathematics).

I also enjoyed reading his commentary on the built in functions any and all, which are useful when you're testing for occurrences in conditional expressions.

## Sources

[1] http://stackoverflow.com/q/20300671/3928184