commit message from python script
This commit is contained in:
9
test_skripte/comp_lampda_map.py
Normal file
9
test_skripte/comp_lampda_map.py
Normal file
@@ -0,0 +1,9 @@
|
||||
i = [2, 4, 6, 8 , 10 ]
|
||||
|
||||
# List comprehension
|
||||
test = [x * 2 for x in i]
|
||||
# lampda function
|
||||
lam_test = list(map(lambda x: x * 3, i))
|
||||
print(i)
|
||||
print(test)
|
||||
print(lam_test)
|
||||
@@ -4,4 +4,13 @@ import os, sys
|
||||
|
||||
|
||||
if not os.path.exists(os.sep + "home" + os.sep + os.environ["USER"]) is True:
|
||||
print("yes")
|
||||
print("yes")
|
||||
|
||||
my_discts = {}
|
||||
with open("/etc/os-release", "r") as file:
|
||||
lines = list(map(str.rstrip, file))
|
||||
for line in lines:
|
||||
date = line.split("=")
|
||||
my_discts[date[0]] = date[1]
|
||||
|
||||
print(my_discts)
|
||||
Reference in New Issue
Block a user