error while passing the value in python

后端 未结 2 1222
死守一世寂寞
死守一世寂寞 2021-01-29 14:04
 def row_minimum(x,L):
  L=L
  if x==\'1\':
    row_minimum1=min(L[0],L[1],L[2],L[3],L[4])
    return row_minimum1
  elif x==\'2\':
    row_minimum2=min(L[5],L[6],L[7],L         


        
2条回答
  •  被撕碎了的回忆
    2021-01-29 14:32

    Your code has two nested definitions of user_input, so when you call it you get out the function definition instead of what it is supposed to return. Delete one of the def user_input(y): lines and fix your indentation and I bet it works.

提交回复
热议问题