python 筆記--同時輸入兩個數字

1.同時輸入兩個整數:函數 >>> a,b=map(int,input().split()).net 10 20 >>> a+b 30blog 2.輸入兩個字符串:字符串 >>> a,b=input().split()input 10 20 >>> a+b '1020'it 3.使用eval()函數io >>> a,b=eval(input()) 10,20 >>> a+b 30 --------
相關文章
相關標籤/搜索