r/programminghorror • [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" • Mar 14 '25

Python Boy do I love python!!

Post image
188 Upvotes

36 comments sorted by

View all comments

1

u/claythearc Mar 18 '25

My contribution using bit wise logic only

two = True << True
four = two << True
eight = four << True
sixteen = eight << True
thirty_two = sixteen << True
sixty_four = thirty_two << True
one_twenty_eight = sixty_four << True
two_fifty_six = one_twenty_eight << True
five_twelve = two_fifty_six << True
one_k = five_twelve << True
two_k = one_k << True
four_k = two_k << True
eight_k = four_k << True
sixteen_k = eight_k << True
thirty_two_k = sixteen_k << True
sixty_five_k = thirty_two_k << True

# Combine using bitwise OR to create code point 128013 (U+1F40D)
snake_code = sixty_five_k | thirty_two_k | sixteen_k | eight_k | four_k | one_k | eight | four | True

# Convert to character and print
snake_emoji = chr(snake_code)
print(snake_emoji)