Skip to content

Commit 1abbff8

Browse files
committed
list comprehension
1 parent 1bf6434 commit 1abbff8

File tree

5 files changed

+38
-5
lines changed

5 files changed

+38
-5
lines changed

.idea/Python Complete.iml

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/List_Comprehension.xml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Basic Python/31. Python File Hanndling Part-1.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
{
6868
"cell_type": "code",
69-
"execution_count": 45,
69+
"execution_count": 1,
7070
"metadata": {},
7171
"outputs": [
7272
{
@@ -75,7 +75,7 @@
7575
"'Hello world'"
7676
]
7777
},
78-
"execution_count": 45,
78+
"execution_count": 1,
7979
"metadata": {},
8080
"output_type": "execute_result"
8181
}

Basic Python/List_Comprehension.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
x = [1,2,3,4,5,6,7,8,9]
2+
obj1 = [y for y in x if y % 2==0]
3+
obj2 = [y for y in x if y % 2==1]
4+
print("Even Numbers: ", obj1, "\nOdd Numbers: ",obj2)
5+
6+
doc = print.__doc__
7+
print(doc)

0 commit comments

Comments
 (0)