steave ray
answered Aug 3 '21 00:00
you should use * instead of ** at format function , see below code :
print('{0} {1} {0!r}'.format(*'abrakadabara'))
will print
a b 'a'
so if suppose if you have
abc = {'a': 'A', 'b': 'B'}
print('{a} {b} {a!r}'.format(**abc))
in above code with ** , can Access arguments’ attributes which is a , b in our case so result is
A B 'A'