def expand(string):
    """Expand the string with some known source extensions

    >>> freds = list(expand('fred'))
    >>> assert 'fred.py' in freds and 'fred.sh' in freds
    """
    source_code_extensions = ['py', 'sh', 'c', 'cpp', ]
    stem = string[:-1] if string[-1] == '.' else string
    return ['.'.join((stem, e)) for e in source_code_extensions]