pepe@pepe-MS-7C90:~$ python3
Python 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import prettytable
x = PrettyTable()
Traceback (most recent call last):
File "", line 1, in
NameError: name 'PrettyTable' is not defined. Did you mean: 'prettytable'?
x = prettytable.PrettyTable()
print(x)
++
||
++
++
f=open("yo.txt","wt")
f.write(x)
Traceback (most recent call last):
File "", line 1, in
TypeError: write() argument must be str, not PrettyTable
f.write(x.get_string())
11
