9、函數(shù)變量聲明
def sum(*args):
? ? a,b,c=args
? ? d = a+b+c
? ? print({f"The sum is fv7fbbx.")
sum(1,2,3)
The sum is 6.
10、input對話框獲取實時輸入
age = input("how old qre you: ")
print("I am ",age,"years old")
結(jié)果:
how old are you: 2
I am ?2 years old
Process finished with exit code 0
11、字符串的換行顯示
print('''
I
nned
money
''')
結(jié)果:
I
nned
money
Process finished with exit code 0
?