```
tmp = []
list_t = []
for i in nums:
tmp.extend(i)
s = len(tmp)
if s < r * c:
return nums
else:
for i in range(r):
t = []
s = i * c
t.extend(tmp[s:(i+1)*c])
list_t.append(t)
return list_t
```

maybe it's simple to understand