loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
item = [1,2,3,4]
print(item)

itemsquared = map(lambda x: x**2, item)
itemsquaredlist = list(itemsquared)
print(itemsquared)
print(itemsquaredlist)

itempower = list( map( (lambda x, y: x**y), item, itemsquaredlist ) )
print(itempower)

smallerthan3 = list( filter( lambda x: x<3, item ) )
print(smallerthan3)

smallerthan3lc = [n for n in item if n<3]
print(smallerthan3lc)

itemsquaredlc= [n**2 for n in item]
print(itemsquaredlc)

sqcondlc=[n**2 for n in item if n<2 ]
print(sqcondlc)