On 12/2/2011 8:49 AM, surya k wrote:
Hi,
Just take a look at this small code.. I am just taking a string as
input and assigning it as a list.
But I am finding an unexpected entry in the list.. Why this is happening?
I am using PyScripter IDE.
code :
#!/usr/bin/env python
def main():
pass
if __name__ == '__main__':
main()
print "Flames: "
name1 = raw_input('enter name 1')
ListName1 = list(name1)
print name1
print ListName1
Output:
Flames:
foo
*[u'f', u'o', u'o']*
Observe the last line.. it isn't showing [ 'f', 'o', 'o']
Why is that "u" coming in the middle from no where ??
input is returning user entry as unicode.
--
Bob Gailer
919-636-4239
Chapel Hill NC
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor