Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Commented solution for SalusLab's beginners' python challenge
#!/usr/bin/env python3
y = ['0b1010011', '0b1100001', '0b1101100', '0b1110101', '0b1110011', '0b1101100', '0b1100001', '0b1100010', '0b1111011', '0b1000111', '0b110000', '0b1011111', '0b110011', '0b1100001', '0b1010011', '0b1111001', '0b1011111', '0b110000', '0b1101110', '0b1011111', '0b1101101', '0b110011', '0b1111101']
integers_list = [];
#convert each element into a base-10 integer
for i in y:
_integer_value = int(str(i),2)
integers_list.append(_integer_value)
characters_list = []
#grab each character from its unicode value
for i in integers_list:
_character = chr(i)
characters_list.append(_character)
#join all characters into a single string called "flag"
flag = ''.join(characters_list)
#print(flag)
print("The flag is ====> %s" %(flag) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.