no message

This commit is contained in:
yinjun.chen1
2026-10-08 15:18:13 +08:00
parent d81e06d34c
commit 1adbcf0e03
3 changed files with 20 additions and 12 deletions
+10 -10
View File
@@ -5,13 +5,13 @@ def hehe(a,b,c):
hehe('x','y','z')
#函数返回值
def haha(a,b,c):
"""
:param a:这是函数的文档1
:param b:这是函数的文档2
:param c:这是函数的文档3
:return: 这是函数的文档4
"""
return a+b+c
print("----")
print(haha(1,2,3))
# def haha(a,b,c):
# """
# :param a:这是函数的文档1
# :param b:这是函数的文档2
# :param c:这是函数的文档3
# :return: 这是函数的文档4
# """
# return a+b+c
# print("----")
# print(haha(1,2,3))
+4 -2
View File
@@ -1,4 +1,6 @@
# 与map在一块使用
numbers = [1,2,3,4]
a= list(map(lambda x:x*2,numbers))
print(a)
# a= list[int](map(lambda x:x*2,numbers))
# print(a)
add = lambda x:x*2
print(add(2))
+6
View File
@@ -0,0 +1,6 @@
def square(x:int):
return x * 3
numbers = [1, 2, 3, 4, 5]
result = map(square, numbers)
print(list[int](result))