Post History
Python 3, 51 25 bytes n=int(input());print(n%2) Try it online! Golfed 26 bytes using the technique from my PHP answer.
Answer
#2: Post edited
# [Python 3], 51 bytes- <!-- language-all: lang-python -->
n=int(input())if n%2==1:print("1")else:print("0")[Try it online!][TIO-kqjka7wq]- [Python 3]: https://docs.python.org/3/
[TIO-kqjka7wq]: https://tio.run/##K6gsycjPM/7/P882M69EIzOvoLREQ1OTKzNNIU/VyNbW0KqgCCShZKikyZWaU5wK4xsoaf7/b2wIAA "Python 3 – Try It Online"
- # [Python 3], <s>51</s> 25 bytes
- <!-- language-all: lang-python -->
- n=int(input());print(n%2)
- [Try it online!][TIO-kte5ft5g]
- Golfed 26 bytes using the technique from [my PHP answer](https://codegolf.codidact.com/posts/282421/284116#answer-284116).
- [Python 3]: https://docs.python.org/3/
- [TIO-kte5ft5g]: https://tio.run/##K6gsycjPM/7/P882M69EIzOvoLREQ1PTuqAIxM1TNdL8/9/YEAA "Python 3 – Try It Online"
#1: Initial revision
# [Python 3], 51 bytes <!-- language-all: lang-python --> n=int(input()) if n%2==1:print("1") else:print("0") [Try it online!][TIO-kqjka7wq] [Python 3]: https://docs.python.org/3/ [TIO-kqjka7wq]: https://tio.run/##K6gsycjPM/7/P882M69EIzOvoLREQ1OTKzNNIU/VyNbW0KqgCCShZKikyZWaU5wK4xsoaf7/b2wIAA "Python 3 – Try It Online"