Hi i am trying to create a function which allow string input as below:
def change_template(condition):
template='''
<div style="background:<%=
(function colorfromint(){
if(condition){ #change the condition inside here
return("green")}
}()) %>;
color: black">
<%= value %>
</div>
'''
return template
So whenever I input condition into change_template function, let say change_template('A' < 'B') then the condition would be
template='''
<div style="background:<%=
(function colorfromint(){
if('A' < 'B'){ #change the condition inside here
return("green")}
}()) %>;
color: black">
<%= value %>
</div>
'''
"'A' < 'B'"?condition? Or just what exactly?conditionlike'<div>...' + condition + '...</div>'