Thanks again, all.
I think the python -i scoping2.py would have given me a good beginning
as well - will archive that one for use.
And, to maybe explain how I work - not an excuse at all - but, I am
actually 100% blind, so a lot of the IDE's, or their common
means/methods of interaction do
If a dictionary key has a Python list as its value, you can read the values
one by one in the list using a for-loop like in the following.
d = {k: [1,2,3]}
> for v in d[k]:
> print(v)
No tutorial describes this, why?
What is the Python explanation for this behaviour?
Varuna
--
https://m
On 2024-03-07 14:11, Varuna Seneviratna via Python-list wrote:
If a dictionary key has a Python list as its value, you can read the values
one by one in the list using a for-loop like in the following.
d = {k: [1,2,3]}
for v in d[k]:
print(v)
No tutorial describes this, why?
What is t
On 3/7/24 07:11, Varuna Seneviratna via Python-list wrote:
If a dictionary key has a Python list as its value, you can read the values
one by one in the list using a for-loop like in the following.
d = {k: [1,2,3]}
for v in d[k]:
print(v)
No tutorial describes this, why?
What is the
On 06Mar2024 15:12, Jacob Kruger wrote:
So, this does not make sense to me in terms of the following snippet
from the official python docs page:
https://docs.python.org/3/faq/programming.html
"In Python, variables that are only referenced inside a function are
implicitly global. If a variable