Cowyeet/empty_matrix.py

26 lines
349 B
Python
Raw Normal View History

#!/usr/bin/python3
import pyperclip
width = int(input("Width: "))
height = int(input("Height: "))
print("[")
matrix_str = "[\n"
for bla in range(height):
line = []
for bla in range(width):
line.append(0)
matrix_str += str(line) + ",\n"
print(str(line) + ",")
print("]")
matrix_str += "]"
pyperclip.copy(matrix_str)