You are choosing a random string, printing it, then choosing another string and compare it to "1"!
Each time you call random.choice(rownum1), you will get a new randonrandom string. The correct way to do what you want is to store the random string in a variable:
import random rownum1 = ["1","2","3","4","5","6","7","8","9"] num = random.choice(rownum1) # <- store the value in a variable for later reuse print(num) if num == "1": del rownum1[0] print(rownum1)