KaranVersation

wtf-ython

(Nano-blog alert)

In [1]: bool(...)
Out[1]: True
In [2]: a = 1_00_000
In [3]: for x in [1, 2, 3]:
   ...:     if x > 5:
   ...:         break
   ...: else:
   ...:     print('Nice')
   ...:
Nice

Getting to know none of these throw a syntax error = Mind blown ^_^

Full blog and credits: https://towardsdatascience.com/hidden-gems-of-python-76020b14e42f

K.

← Back to posts