Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 committed Jan 13, 2015
1 parent d0d4642 commit 64620ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/largest-number.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class Solution:
def largestNumber(self, num):
num = [str(x) for x in num]
num.sort(cmp=lambda x, y: cmp(y + x, x + y))
ret = ''.join(num)
return ret.lstrip('0') or '0'
largest = ''.join(num)
return largest.lstrip('0') or '0'

if __name__ == "__main__":
num = [3, 30, 34, 5, 9]
Expand Down

0 comments on commit 64620ce

Please sign in to comment.