Python中的print函数

tha*_*ing 4 python printing

我需要一些Python的帮助,打印:

我有:

input = [(3,'x1'),(5,'x3'),(2,'x2')]

需要以这种形式打印:

x1=3 x2=2 x3=3
Run Code Online (Sandbox Code Playgroud)

非常感谢

eig*_*ein 9

print ' '.join('%s=%s' % (k, v) for (v, k) in input)
Run Code Online (Sandbox Code Playgroud)