Python reimplementation of Lost In Space by Tim Hartnell
Nested functions

Not really sure what your motivation was, here, but this Russian nesting doll of functions is not really necessary. Under certain narrow circumstances, like limiting the number of publicly visible methods in a library, it might be called-for - but not really here. You don't need closures for this code, so just move things up to global namespace.

Variable case

A-C should be lower-case because they aren't types.

Random unpacking

a, b, c = (int(7*random() + 1) for _ in range(3))


Never except:

Currently, you can't Ctrl+C out of the program, because you're catching all exceptions. Narrow your exception type.

Don't materialize generators

D, E, F = [get_input(axis) for axis in "YXZ"]


should be

d, e, f = (get_input(axis) for axis in "YXZ")


because you don't need to keep that list in memory.

Format strings

print(str(D) + str(E) + str(F))


becomes

print(f'{d}{e}{f}')


Stack abuse

You call game, which calls end, which calls game... Don't do this. Just loop.