By Vasudev Ram
Hi reader [1],
Analyze the snippet of Python code below. See what you make of it.
I will discuss it in my next post.
>>> a = 1
>>> lis = [a, 2 ]
>>> lis
[1, 2]
>>> lis = [a, 2 ,
... "abc", False ]
>>>
>>> lis
[1, 2, 'abc', False]
>>> a
1
>>> b = 3
>>> lis
[1, 2, 'abc', False]
>>> a = b
>>> a
3
>>> lis
[1, 2, 'abc', False]
>>> lis = [a, 2 ]
>>> lis
[3, 2]
>>>
[1] This product is suitable for Pythonistas aged 1 to 2 (approximately). For those of higher age, the dose may have no effect :)
- Vasudev Ram - Online Python training and consulting
Are you a blogger with some traffic? Get Convertkit:Email marketing for professional bloggersGet updates (via Gumroad) on my forthcoming apps and content. Jump to posts: Python * DLang * xtopdf Subscribe to my blog by email My ActiveState Code recipesFollow me on: LinkedIn * Twitter
Saturday, March 11, 2017
Subscribe to:
Post Comments (Atom)
1 comment:
>This product is suitable for Pythonistas aged 1 to 2 (approximately).
Correction: for Pythonistas aged 0 to 2.
Why should we leave out those child prodigies ...
Post a Comment