Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45927
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Subject | Re: Prepending string "@" to usernames |
| Date | 2013-05-25 00:16 +0100 |
| References | <CAEcwjcx6WtUMTg=QpqjEZ3fyfUhOLWQ2v-pF4qQ9ypFd3DtByA@mail.gmail.com> <CAGGBd_okY709NyG0BBZSHzv709oTAUNbicMgfOMjo3LjFDipwQ@mail.gmail.com> <CAEcwjcyFYMg6sxND7XE6cKOkab3HB2nA89CBJLp2Cq9g5F3h-A@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2086.1369437398.3114.python-list@python.org> (permalink) |
On 25/05/2013 00:04, Thomas Murphy wrote:
>> Maybe this is what you're looking for?
>>
>> raw_address = "cookielover93 TheGermanHatesSaurkraut WhatsThatBoy932834"
>> address_library = raw_address.split()
>> print address_library
>>
>> final_address = []
>> for address in address_library:
>> final_address.append("@" + str(address))
>> print final_address
>>
> Exactly it. Thank you so much Dan. Perfect!
>
>
>
> --
> Sincerely,
> Thomas Murphy
> Code Ninja
> 646.957.6115
>
You can safely remove the call to str as address is already a string.
--
If you're using GoogleCrap™ please read this
http://wiki.python.org/moin/GoogleGroupsPython.
Mark Lawrence
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Prepending string "@" to usernames Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-05-25 00:16 +0100
csiph-web