我有這樣的代碼這需要在String ... //Takes in string from whatever it is, in this case a JOptionPane
String input = JOptionPane.showInputDialog("Input string");
//if there is a string
if (!(input == null)) {
我有一個程序,它可以找到數組中最大值的索引,然後從該點開始將它分成兩個子數組。這裏是什麼樣子: def main():
numbers = eval(input("Give me an array of numbers: "))
largest = numbers[0]
ind = numbers.index(max(numbers))
print("Ind