#!/usr/bin/env python

def convert(func, seq):
    'conv. sequence of numbers to same type'
    newSeq = []
    for eachNum in seq:
        newSeq.append(func(eachNum))
    return newSeq

def test():
    'test function for numconv.py'
    myseq = (123, 45.67, -6.2e8, 999999999L)
    print convert(int, myseq)
    print convert(long, myseq)
    print convert(float, myseq)

if __name__ == '__main__':
    test()
