我想继续这样做,如果用户输入一个str作为高度/宽度或其中一个坐标,它会给出一个错误,但我无法确切地知道如何做到这一点。= str and str(c) != "red" and str(c) != "green" and str(c) != int and int(y) == int:
y = input("That is an invalid y-coordinat
我应该编写一个函数,让用户输入任何数字字符串,然后将输入转换为int列表(例如"12635,1657,132651627")。但是,我不知道如何更改这段代码,以便用户能够实际地将某些内容放入控制台。def Int_Split(a): last = 0 for i in range (max): nmbr = a[last:i]
def record(self, *data: Sequence[Union[int, float, str]]) -> None:
if field.type in {1, 3}: value = int(value) # warning如果它是Sequence的一个元素,这意味着它将是一个Union[int, float, s