• + 0 comments

    here he compared the value of 1st index in s with "append"

    so if user type ------> append 3 , then this 'if' condition will work

    and in lis.append(int(s[1])) he typecasted the 2nd input into

    integer, since he's taking input in form of string .

    NOTE - input() by default take input as string,