Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45927 > unrolled thread

Re: Prepending string "@" to usernames

Started byMark Lawrence <breamoreboy@yahoo.co.uk>
First post2013-05-25 00:16 +0100
Last post2013-05-25 00:16 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Prepending string "@" to usernames Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-05-25 00:16 +0100

#45927 — Re: Prepending string "@" to usernames

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-05-25 00:16 +0100
SubjectRe: Prepending string "@" to usernames
Message-ID<mailman.2086.1369437398.3114.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web