During the interview, I was given a piece of Python code:
"".join([x for x in "\x63\x6c\x75\x62"])
The interviewer asked me: Can you make this piece of code faster with just a tiny tweak to the existing code? The output should stay exactly the same.
Enough to say, I failed this question. I'm wondering if anything could help me understand how to optimize this code?
Thanks a lot.