how to join various bits of string and data together using python -
python newbie here. i've been working way through code create string includes date. have bits of code working data want, need formatting string tie in data together. this have far: def get_rectype_count(filename, rectype): return int(subprocess.check_output('''zcat %s | ''' '''awk 'begin {fs=";"};{print $6}' | ''' '''grep -i %r | wc -l''' % (filename, rectype), shell=true)) str = "my values (" rectypes = 'click', 'bounce' myfilename in glob.iglob('*.gz'): #print (rectypes) print str.join(rectypes) print (timestr) print([get_rectype_count(myfilename, rectype) rectype in rectypes]) my output looks this: clickmy values (bounce '2015-07-01' [222, 0] i'm tr...