Python 程序使用字符串格式化打印元组

编写一个 Python 程序,使用字符串格式化打印元组。以下是使用字符串格式化打印元组项的方法。

numTuple = (20, 40, 60, 80, 100, 120, 140)
print(numTuple)

print("Tuple Items are = {0}".format(numTuple))

print("Tuple Items are = %s" %(numTuple,))

print("Tuple Items are = %s" %(numTuple))
Print Tuple using string formatting