i have a tuple which looks like this b (u'3.7', 9023). i want to use it in the following statement :
if list(self.ballot_number) == msg.ballot_number and b in waitfor:
print "hello"
i have checked and the ballotnumber section of the if condition is worrking fine. it's the second part that's not returning true. the waitfor set looks like this : set([((u'3.0', 9002), (u'3.1', 9005), (u'3.2', 9008), (u'3.3', 9011), (u'3.4', 9014), (u'3.5', 9017), (u'3.6', 9020), (u'3.7', 9023))]).
The value of tuple are there in the set but they are not able to match it probably because of different data types. i don't want to split the tuple into individual elements as i have to use it collectively later in the code. How can i run my if statement?
Aucun commentaire:
Enregistrer un commentaire