I need to print something like this
"a=name1,b=name2,c=name1,d=name2"
While I have name1 and name2 in variable n1 n2
n1="name1"
n2="name2"
what I am trying to do
"a=%s,b=%s,c=%s,d=%s" % (n1,n2,n1,n2)
Is there a better way than this? way to avoid n1,n2,n1,n2 ?
with python 3 ?
and what if
print sys.version_info
(2, 1, 0, 'final', 0)
1 Answer