Given the following Python 3 script:
def greet(): print("Hello, world!") greet()
Prepend some lines to this text file so that it can be both executed as a Python program as well as compiled and run as a C++ program producing the same output Hello, world! (including the newline at the end):
$ python3 bilingual.py.cpp Hello, world! $ g++ bilingual.py.cpp && ./a.out Hello, world!
The solution will be scored by the count of non-whitespace characters of the entire program, including the Python script:
sed 's/\s//g' bilingual.py.cpp|wc -c