+ 1
How to draw a grid in python
8 Answers
+ 2
Nwachi Faith
Do you mean something like a data frame?
An example:
https://code.sololearn.com/cxBcbws6Ll20/?ref=app
+ 1
Thanks. But o actually wanted to print a grid like a graph sheet
+ 1
https://code.sololearn.com/cJz9bL2VPR3g/?ref=app
MY ATTEMPT 😃
0
Nwachi Faith
Something like this perhaps:
height = int(input())
width = int(input())
print(("_"*3+" ")*width)
for i in range(height):
print((" "*3+"|")*width)
print(("_"*3+"|")*width)
0
You could look at tabulate module. It has several grid designs which you can use very easily.
https://pypi.org/project/tabulate/