Is there any in build function in python which enables two compare two string.
i tried comparing two strings using ==
operator but not working.
try:
if company=="GfSE-Zertifizierungen":
y=2
if x<y:
print "**************Same company***********"
x=x+1
flag=0
pass
if x==y:
flag=1
x=0
count=count+1
except Exception as e:
print e
This is not even showing any error nor working out. Can anyone assist me where I m going wrong
if company=="GfSE-Zertifizierungen":
. See if that gets printed. If it does, you know that the error doesn't lie in that if-test.x
andy
have to do with comparing strings?company
? Note that e.g."GfSE-Zertifizierungen" != "GfSE Zertifizierungen"
. Also, you should have as little as possible in thetry
block; move the rest to anelse
.