@kepstin well, was looking at itertools.product and went "huh, I wonder if I could..." and turns out I can
Conversation
Notices
-
halcy:icosahedron: (halcy@icosahedron.website)'s status on Tuesday, 15-Jan-2019 06:16:27 JST halcy:icosahedron: -
halcy:icosahedron: (halcy@icosahedron.website)'s status on Tuesday, 15-Jan-2019 06:09:31 JST halcy:icosahedron: please enjoy this beautiful, concise and not at all hard to read code to convert binary numbers to decimal in python:
-
halcy:icosahedron: (halcy@icosahedron.website)'s status on Tuesday, 15-Jan-2019 06:12:06 JST halcy:icosahedron: @monorail I mean it's not golf honestly
it's just a bad idea that worked out
-
halcy:icosahedron: (halcy@icosahedron.website)'s status on Tuesday, 15-Jan-2019 06:13:28 JST halcy:icosahedron: @dotUser (((((((((((((((((((((((()))))))))))))))))))))
-
halcy:icosahedron: (halcy@icosahedron.website)'s status on Tuesday, 15-Jan-2019 06:18:47 JST halcy:icosahedron: @minus I wonder if python is smart enough to only evaluate the one element it has to
probably not
-
halcy:icosahedron: (halcy@icosahedron.website)'s status on Tuesday, 15-Jan-2019 06:20:03 JST halcy:icosahedron: @minus too bad!
-
halcy:icosahedron: (halcy@icosahedron.website)'s status on Tuesday, 15-Jan-2019 06:24:27 JST halcy:icosahedron: @yabirgb why NOT
-
halcy:icosahedron: (halcy@icosahedron.website)'s status on Tuesday, 15-Jan-2019 06:25:07 JST halcy:icosahedron: y'all I know how to convert bases in a not ridiculous way, please
-
Harmon758 (harmon758@mastodon.social)'s status on Tuesday, 15-Jan-2019 06:40:51 JST Harmon758 @halcy Why not ["".join(p) for p in itertools.product(*("01",)*4)].index("0110")
halcy:icosahedron: repeated this. -
halcy:icosahedron: (halcy@icosahedron.website)'s status on Tuesday, 15-Jan-2019 06:41:40 JST halcy:icosahedron: @Harmon758 what an optimization!
-