A list shows empty when it has one element in it!

can anyone solve this problem ?

When the list contain 1 integer what does it reply “empty list” or “0” element becz most of time list start it’s counting from 0 it means if you want to store 30 value it will be from 0 to 29

means, i have to change the integer range from ‘0’ to ‘lenth of list - 1’ ?

Not sure but try , try try try and lead the way

been trying for the past 24 hours :joy:

You must have learnt most of the wrong way which will help you in future… Keep trying and learning

In AI2 and all its clones list start with 1

Nopp

Unfortunately we cannot bear to guess anymore, post your aia or spend more hours to find the solution yourself.

/Boban

I can’t figure out exactly what your code does, but I think you’re dealing with a logic error in Next_Button.click (and maybe in Web1.Got Text ):

1 First you show the list random item in the label “randomquestionnumber”
2 Then you delete this item list
3 Finally you test if the list is empty

In the event of only one element in the list, this code returns True in step 3, even if you had previously seen (in the randomquestionnumbers label) that there was an element in the list.

Is that the mistake maybe?

After hours of hard work I have solved it myself…:sunglasses:
Even though I got it working I have no idea why it didnt work before :roll_eyes:

So what was causing the error

No idea… but this solved my problem…

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.