Python Program to Print Tuple using string formatting

Write a Python Program to Print Tuple using string formatting. The following are ways to print the tuple items using string formatting.

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))
Python Program to Print Tuple using string formatting 1

About Suresh

Suresh is the founder of TutorialGateway and a freelance software developer. He specialized in Designing and Developing Windows and Web applications. The experience he gained in Programming and BI integration, and reporting tools translates into this blog. You can find him on Facebook or Twitter.