I am inputting a text file (Line)(all strings). I am trying to make card_type to be true so it can enter the if statement, however, it never enters the IF statement. The output that comes out from the print line is:
imm48-1gb-sfp/imm48-1gb-sfp
imm-2pac-fp3/imm-2pac-fp3
imm5-10gb-xfp/imm5-10gb-xfp
sfm4-12/sfm4-12
This is the code:
print str(card_type)
if card_type == re.match(r'(.*)/(.*)',line):
card_type = card_type.group(1)