summaryrefslogtreecommitdiff
path: root/2010/1a/a.py
diff options
context:
space:
mode:
Diffstat (limited to '2010/1a/a.py')
-rw-r--r--2010/1a/a.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/2010/1a/a.py b/2010/1a/a.py
index e96a53e..c3f6aab 100644
--- a/2010/1a/a.py
+++ b/2010/1a/a.py
@@ -8,11 +8,7 @@ def rotate(m):
# drop a single row
def droprow(r):
- n = len(r)
- for i in range(n)[::-1]:
- if r[i] != '.':
- return r[i+1:]+r[:i+1]
- return r
+ return '.' * r.count('.') + r.replace('.','')
# drop the rotated matrix
def gravity(m):