看起来像这样:
public class MyInnerViewModel {
public int getAttr() {
return 1234;
}
}
它的第一个数字,第二个,操作和另外两个参数。我想把它分割成:在这里输入代码
in1: [complex(1.0, 1.0), complex(1.0, 1.0), ’*’, False, ’nazwa’]
in2: [complex(1 , 1), 2, ’+’, True, ’test’]
和另外2人。 我尝试了input()。split()但是它像这样拆分:[(complex(1.0 | 1.0)|'*'etc。
答案 0 :(得分:1)
input1 = [complex(1.0, 1.0), complex(1.0, 1.0), '*', False, 'nazwa']
number1 = input1[0]
number2 = input1[1]
noperation = input1[2]
等
答案 1 :(得分:0)
你可以使用,input1 [index] =输入("你的消息在这里") 您也可以将输入转换为所需的基本类型,例如, input1 [index] = int(输入("你的消息在这里"))