if c is a:
Process finished with exit code 0
Post a Reply
|Oldest Newest Rating|
Otto Von Chesterfield
· August 9, 2015
First, try to put your code in blocks like these:
It makes things a whole lot easier to understand.
Next, the "is" keyword checks to see if c and a are the same objects. While they both represent the same value, they began in different ways. Instead, use the '==' operator. I've tried it and it works.
The reason it works is because the '==' operator calls the object's __equ__ method. This method checks to see if c and a have the same values (aka. they both say "['kathmandu']").
This section is all about snakes! Just kidding.
|Bucky Roberts Administrator|