用Python进行类型转换为Integer

时间:2017-11-22 18:13:36

标签: python string integer typecasting-operator

L = int(input())  
N = int(input())  
W, H = int(input().split(" "))  
for num in range(N):    
    if (W < L or H < L):    
        print("UPLOAD other")][1]

https://i.stack.imgur.com/xgtoS.jpg enter image description here

1 个答案:

答案 0 :(得分:1)

int(...)构造一个无法解压缩到元组W, H的整数。您可能想要的是

W, H = (int(x) for x in input().split(" "))