Skip to content

Commit 7f6b073

Browse files
authored
Merge pull request #2 from AdithyaS99/newbranch
One-liner to input space separated integers in a list
2 parents 9a4e660 + 8ea629b commit 7f6b073

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

one_liners.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# Sum Over Every Other Value Python One-Liner
88
sum(stock_prices[::2])
99

10+
#To input space separated integers in a list
11+
lis = list(map(int, input().split()))
12+
1013
# Read File Python One-Liner
1114
[line.strip() for line in open(filename)]
1215

0 commit comments

Comments
 (0)