How to print a Hollow cude

1 week ago 4
ARTICLE AD BOX

I want to print a hollow Cube in python any one who know how to do that please tell me

i already try this but it print the side lines wrong'

rows = 5 cols = 10 for r in range(rows): if r == 0 or r == rows - 1: print("*" * cols) else: print("*" + " " * (cols - 2) + "*")
Read Entire Article