0
If I apply a string - say a ="cars" and give a== cars I will get a syntax error after a boolean operation.Why is that.??
2 odpowiedzi
+ 3
You have to understand the basic concept thoroughly to provide a good foundation for more complex tasks.Remember:Strings need " or ' before and after them.Also,strings embedded in functions do not produce quotation marks.
Eg:
print("Python is awesome")
Result:
Python is awesome
0
You should enclose "cars" in double qutations as a is String and you need to compare it with String only.