My question is not related to a problem, as such, but I looked at several python scripts, like the one below:
''.join([i if ord(i) < 128 else '' for i in text])
The list is built on a loop and contains an IF statement. I tried to find in the documentation the structure of such formula (e.g why put the IF in front and the FOR at the end). I am trying to understand the logic behind, in order to be able to build and develop my own formula. Unfortunately, despite all the documentation I looked on the net and books I bought, the information was pretty basic (usually they use enumerated lists and that's it). Could any of you give me a link to a doc that would be a bit more explicit on this topic ?
I recently discovered the dict(zip(a,b))
-way to build dictionary, but the lack of understanding of this topic keeps me behind...
Best Regards,