pip install mysql-connector pip install mysql-connector-python pip install pymysql pip install sqlalchemy pip install tabulate pip3 install mysql-connector-python
from tabulate import tabulate
data = []
for i in range(5):
print("Book", i+1)
book = input("Enter book name: ")
price = int(input("Enter price: "))
data.append([book, price])
headers = ["Book", "Price"]
print("\nTable:\n")
print(tabulate(data, headers=headers, tablefmt="grid"))
Another Code
Debugging in python
import pdb; for i in range(1,10): pdb.set_trace() print(i) Now press F5, the program will execute and press n for keyboard, and u will get the desired result