Post History
Python 3, 34 bytes x=0;y=1 while 1:x+=y;print(x);y+=2 Try it online! 1 is the int equivalent to True, which helps save bytes.
Answer
#2: Post edited
- # [Python 3], 34 bytes
- <!-- language-all: lang-python -->
- x=0;y=1
- while 1:x+=y;print(x);y+=2
- [Try it online!][TIO-ks8ybt8n]
- [Python 3]: https://docs.python.org/3/
- [TIO-ks8ybt8n]: https://tio.run/##K6gsycjPM/7/v8LWwLrS1pCrPCMzJ1XB0KpC27bSuqAoM69Eo0LTulLb1uj/fwA "Python 3 – Try It Online"
- # [Python 3], 34 bytes
- <!-- language-all: lang-python -->
- x=0;y=1
- while 1:x+=y;print(x);y+=2
- [Try it online!][TIO-ks8ybt8n]
- `1` is the `int` equivalent to `True`, which helps save bytes.
- [Python 3]: https://docs.python.org/3/
- [TIO-ks8ybt8n]: https://tio.run/##K6gsycjPM/7/v8LWwLrS1pCrPCMzJ1XB0KpC27bSuqAoM69Eo0LTulLb1uj/fwA "Python 3 – Try It Online"
#1: Initial revision
# [Python 3], 34 bytes <!-- language-all: lang-python --> x=0;y=1 while 1:x+=y;print(x);y+=2 [Try it online!][TIO-ks8ybt8n] [Python 3]: https://docs.python.org/3/ [TIO-ks8ybt8n]: https://tio.run/##K6gsycjPM/7/v8LWwLrS1pCrPCMzJ1XB0KpC27bSuqAoM69Eo0LTulLb1uj/fwA "Python 3 – Try It Online"