на языках в которых ; обязательно
//Java
public class Test {
...
}
//Kotlin
class Test {
...
}
private val arg: Any? = null
a_list = [1, [2, [3]]]
def one_dimens_mass(lst):
new_list = []
for elem in lst:
if type(elem)==list:
new_list+= one_dimens_mass(elem)
else:
new_list.append(elem)
return new_list
print(one_dimens_mass(a_list)