Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Respect
nice job ! very impressive !
Mind blown!
I'm in awe..Bitwise operators
Am I a joke to you?
IPv4 address is a 32-bit integer split into 4 8-bits-long chunks. This solution simply extracts these chunks using bitwise operations.
Can some one explain this method to me please ?
Using & 0xFF looks impressive
Use spoiler flag next time, please.
Good job! My solution is similar:
def int32_to_ip(int32):
return '.'.join([str(int32 >> 8*(3-i) & 0xFF) for i in range(4)])
Because of the below (and even if it doesn't, this still applies), I also don't see how this is any different from all the existing "filter a list with specific simple criteria". It's just mixing two elementary conditions (even number and even index) together. It's basically another duplicate up the pile of duplicates.
Can we at least get something more original?
List comprehension is not enforced, so it is irrelevant to this kata.
Needs random tests