Skip to content

Commit 83f19f1

Browse files
committed
learn python
1 parent 4e7997d commit 83f19f1

2 files changed

Lines changed: 5 additions & 13 deletions

File tree

python/exercise.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,4 +237,8 @@ def checkExist(arr:list,item:int):
237237

238238
array = [1,2,3,4]
239239
item = 3
240-
checkExist(array,item)
240+
checkExist(array,item)
241+
242+
243+
r = lambda a: "True" if a > 5 else "False"
244+
print(r(1))

python/index.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,3 @@ def replaceDigits(s: str) -> str:
268268
# print(replaceDigits(s))
269269

270270

271-
def add(x:int):
272-
return x + 3
273-
274-
def sub(a:int):
275-
return a - 1
276-
277-
n = {
278-
"add": add,
279-
"sub": sub
280-
}
281-
print(n["add"](5))
282-
print(n["sub"](6))

0 commit comments

Comments
 (0)