Post

Python Programming
Python Programming@PythonPr·
This is a very good question; it requires thoughtful thinking from you all.🤔🤔🤔
English
2
0
9
3.3K
Ankit Aggarwal
Ankit Aggarwal@TechAheadAnkit·
@PythonPr x will be 10 for python3.x why because of variable scope inside list comprehension are confined to that only and doesn't exposed outside.
English
1
0
9
1.7K
Algator_phoenix
Algator_phoenix@AlanSan01896098·
@PythonPr Could you explain the x for x in range three-part I don't understand a loop like that.
English
1
0
2
752
American Express
American Express@AmericanExpress·
As the new Official Payments Partner of the NFL, Amex is bringing Card Members closer to the action with special access and experiences at select events worldwide.
English
0
256
2.8K
41.8M
Theoden
Theoden@J_Theoden·
@PythonPr Output = 10 The x variable does not change outside of its original x = 10 statement. The y variable creates a list of x values in range(3). So the x in range iterates into 0, 1, 2, resulting in y = [0, 1, 2]
English
0
0
3
660
Farooq
Farooq@farooqstardust·
@PythonPr That was a tricky question. Answer is 10.
English
0
0
0
397
Starlink
Starlink@Starlink·
Fast, reliable internet no matter how remote. Experience speeds up to 400+ Mbps to enjoy streaming your favorite shows and sports, video calling, browsing forums and weather apps—even in the most rural areas. Order online in under 2 minutes.
English
0
0
2
3.1K
Biel Men
Biel Men@BielMenHaha·
@PythonPr I believe it will be 2. It's a generator expression that overwrites the value of x, like the loop block. So, the interpretation modify this value, because it's not a local scope, like the functions. But, if it does, so the value will be 10, because everything happened in local.
English
0
0
3
639
Paylaş