python

string
http://thepythonguru.com/python-strings/
https://www.tutorialspoint.com/python/string_startswith.htm
if var1 != var2:

output to file
text_file = open("/tmp/debug", "w")
text_file.write("option1: %s\n" % option1)
text_file.write("value1: %s\n" % value1)
text_file.close()