0
casted 2 int yet float value is given
list = [1,2,3,4,5,6] print(list) hlf = (len(list)/2) int(hlf) print(hlf) i = list[ 0:hlf] j = list[ hlf:6] print(i,'\n',j) #hlf value is shown as 3.0
2 Respostas
+ 3
You casted the value, but didn't save it back to the variable.
hlf = int(hlf)
+ 1
tq mate !