On Tue, Feb 24, 2009 at 10:16 AM, Taylan Karaman <taylankara...@gmail.com>wrote:

> Hello,
>
> I am a beginner. And I am trying to get a user input converted to a list.
>
> print 'Enter your first name :'
> firstname = raw_input()
>
> So if the user input is
>
> firstname = 'foo'    ----------->should become-------->
> firstlist['f','o','o']
>
>
> thanks in advance
>
if I understand this correctly, you want a name like "foo" to be changed to
['f', 'o','o']
This is what the list function does. for example,
>>> name = "foo"
>>> list(name)
['f', 'o', 'o']
>>>


> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
لا أعرف مظلوما تواطأ الناس علي هضمه ولا زهدوا في إنصافه كالحقيقة.....محمد
الغزالي
"No victim has ever been more repressed and alienated than the truth"

Emad Soliman Nawfal
Indiana University, Bloomington
http://emnawfal.googlepages.com
--------------------------------------------------------
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to