13
BornForDying
1 12 25
674/ 845
Last seen 5 years ago
Member for 11 years, 4 months, 22 days
Difficulty Normal
Best reviews / Newest reviews
First-axaroth
divmod would come in handy here :) More
First-Vivek
base = int(max([char for char in number]),36) + 1 Ahhh didn't think of just doing max on the characters! I got 'base' in a bit more of a complicated way... lol Oh and btw, you can iterate over strings, eg. max(number) More
First-hidebehind3
assert second_index("try@running@this", "@") == 11, "whoops" More
First-tameeva
Could be simplified with a dict comprehension return {word: text.count(word) for word in words} More
First-sprodney
By the way the != checks are redundant because of the proceeding if conditions More
First-yerik
Probably better off returning 'Fizz Buzz' at the start if the condition is met, rather than assigning it to number and type checking it. You can have more than 1 return statement in a function More
First (try-except)-Elemenope
Bare excepts are always a bad idea unless you re-raise, you'll catch `SystemExit` and `KeyboardInterrupt` for example or silence any unexpected errors. Much better to be specific: `except IndexError` More
First-DenysChy
`sorted` returns a new list, so you don't have to make one. Also `list(numbers_array)` would make a new list, instead of the list comprehension More
First-ManeeshImperial
Interesting way to ignore the negative entries. The `l = list(numbers_array)` step is redundant here, passing a `tuple` to `sorted` is fine More
First-antonantoni39 1
`not ''` always returns `True`, you're not testing the string you just built but an empty string. Also if nothing is found you should be returning empty string not `'Nothing'`, because your statement is always `True` the else can never be hit currently More