Prepending string "@" to usernames

Thomas Murphy thomasmurphymusic at gmail.com
Fri May 24 20:02:23 EDT 2013


> Which can be tidily written as a list comprehension:
>
>   final_address = ['@' + address for address in raw_address.split()]
>
> -tkc
>
>
Ah! Thanks Tim…that tidiness is something I'm trying to head towards
in my own code. I'm trying to transition from the need to visually
write every little step out and write in these more powerful chunks.


--
Sincerely,
Thomas Murphy
Code Ninja
646.957.6115



More information about the Python-list mailing list