Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Finding love solution in Clear category for I Love Python! by p-ilya
def i_love_python():
"""
Everyone loves Python, regardless of what they say about it.
Or about whatever else.
You can find love everywhere!
Note: the current text is a Reddit post by user iXenocider.
"""
from random import choice
N = """I want to love Python, but I can't!
Everyone is always telling everyone else
to learn it because it is a great first language;
I don't see how. I learned C# .NET first and it was amazing.
I feel that it is absolutely useless.
I hate the tab formatting, it has a slower run speed
than the languages I know (Use less memory, though),
I do not like the debugging/No Decent IDE that it offers."""
res = [str(x) for x in "I love Python!"]
love = ''
for i in range(14):
while True:
ch = choice(N)
if ch == res[i]:
love += ch
break
return love
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert i_love_python() == "I love Python!"
Aug. 4, 2017