JkSoftware

Day 16 - Adding Custom Packages

Nov 25th, 2021
733
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from turtle import Turtle, Screen
  2. from prettytable import PrettyTable
  3.  
  4. table = PrettyTable()
  5. table.add_column("Pokemon Name", ["Pikachu", "Squirtle", "Charmander"])
  6. table.add_column("Type", ["Electric", "Water", "Fire"])
  7. table.align = "l"
  8. print(table)
  9.  
  10.  
  11.  
  12. table2 = PrettyTable()
  13. table2.field_names = ["Pokemon Name", "Type"]
  14. table2.add_row(["Pikachu", "Electric"])
  15. table2.add_row(["Squirtle", "Water"])
  16. table2.add_row(["Charmander", "Fire"])
  17. print(table2)
RAW Paste Data