'''
@Author: your name
@Date: 2020-07-14 10:23:33
@LastEditTime: 2020-07-14 11:24:21
@LastEditors: Please set LastEditors
@Description: In User Settings Edit
@FilePath: \vscode_py\day9.py
'''
# Question 26:
# 计算两数之和
def Q26(n1,n2):
return(n1+n2)
# Question 27:
# int转str,并输出
def Q27(n):
s=str(n)
print(s)
# Question 29:
# 输入两个str类型的整数,计算和
def Q28():
num=input("two number: ").split(",")
print("num:{}".format(num))
# num=[int(i) for i in num]
# print(num[0])
sum = lambda num:int(num[0]) + int(num[1])
print("sum:{}".format(sum(num)))
# Question29
# 连接两个字符串
def Q29(v1,v2):
v=v1+v2
print("v:{}".format(v))
# Question30:
# 打印最大长度的字符串
def Q30(s1,s2):
l1=len(s1)
l2=len(s2)
if l1>l2:
print("l1:{}".format(s1))
elif l1<l2:
print("l2:{}".format(s2))
else:
print("l1:{}\nl2:{}".format(s1,s2))
if __name__ == "__main__":
# # Q26
# l=input().split(",")
# n1=int(l[0])
# n2=int(l[1])
# r=lambda n1,n2:n1+n2 # 使用lambda进行计算,输入两个参数n1,n2
# print("r:{}".format(r(3,5)))
# print(Q26(n1,n2))
# # Q27
# in_p=input().split(",")
# l=[int(i) for i in in_p]
# print(l)
# for i in l:
# Q27(i)
# Q28
# Q28()
# Question29
# Q29("3","4")
Q30("hello0","world")