args =[]
csstidy_opts = {
'--allow_html_in_templates':False,
'--compress_colors':False,
'--compress_font-weight':False,
'--discard_invalid_properties':False,
'--lowercase_s':false,
'--preserve_css':false,
'--remove_bslash':false,
'--remove_last_;':false,
'--silent':False,
'--sort_properties':false,
'--sort_selectors':False,
'--timestamp':False,
'--merge_selectors':2,
}
for key value in csstidy_opts.item():
args.append(key)
args.append(':')
args.append(value)
i want to output the string as follow:
"--allow_html_in_templates=false --compress_colors=false..."
if i add the condition, how to do:
if the value is false,the key and value would not output in the string(just only output the ture key and the others)