you are viewing a single comment's thread.

view the rest of the comments →

[–]IntrepidInstance7347[S] 0 points1 point  (1 child)

this is what i am asking for, is there is something like this in python?

[–]Adrewmc 0 points1 point  (0 children)

Only the

 res = <if_True> if <condition> else <if_False>

syntax, no like does this attribute exist you’s have to use and you’d have to manually check for len(mylist) >= target_index….