leet-code use python3 if available

This commit is contained in:
2021-07-27 09:54:55 -06:00
parent 60f824a011
commit 47b44f8d51
3 changed files with 8 additions and 1 deletions

1
projects/leet-code/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
main.py

View File

@@ -3,4 +3,4 @@
--main leet_code.Main
-dce full
--python main.py
-cmd python main.py
-cmd bash test-python.sh

View File

@@ -0,0 +1,6 @@
# "python" is supposed to mean Python3 everywhere now, but not in practice
if [ ! -z "$(which python3)" ]; then
python3 main.py
else
python main.py
fi