Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def AppendCol(a, row, j, b):
- for i in range(row):
- b[i].append(a[i][j])
- row, col = map(int, input().split())
- a = []
- for i in range(row):
- a.append([int(x) for x in input().split()])
- print()
- b = []
- rowb = row
- colb = col
- for i in range(row):
- flag = False
- for j in range(col):
- if a[i][j] == 0:
- flag = True
- if flag:
- b.append(a[0])
- b.append(a[i])
- rowb += 1
- else:
- b.append(a[i])
- for i in range(rowb):
- for j in range(colb):
- print(b[i][j],end = " ")
- print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement