21
Last seen 1 year ago
Member for 10 years, 7 months
Difficulty Normal
This is great solution!
Can you explain why are you using underscore here:
[_] for _ in str(key)]
More
veky, you are definitely my favorite Obfuscator here :)
Can you pls explain
translate({47+x:47-x for x in (1,2)})[2:]
Thx :)
More
Can somebody help me to eliminate duplication on lines 11-17?
Thank you in advance!
Yeah, my return could be nicer.
return True if m(l+map(None, *l)+nw_se+ne_sw) else False
More
I do not exactly know how these \1\1 references are working. Can you explain it to me? Thanks :)
More
OK: What should be better: 1. We don't need to use ceil:
d[call[:10]] += (int(call[20:]) + 59) // 60
2. DiZ's solution is much more elegant:
sum(x + (x - 100) * (x > 100) for x in d.values())
or Veky's:
sum(m + max(m - 100, 0) for m in acc.values())
More
Passing generic exceptions silently is bad practice.
You can wrtie something like this instead:
return max(args) - min(args) if args else 0
or
return len(args) and max(args) - min(args)
More
Faster and less memory consuming is to use generator, it didn’t have to store the entire list.
return sum(1 for w in words if text.lower().find(w) != -1)
aslo is IMHO better to use as condition
if w in text.lower()
More
When you want to use
range(len(...
think if you can't use
enumerate(...
instead.
More