[Tutor] unexpected list entry
surya k
suryak at live.com
Fri Dec 2 14:49:21 CET 2011
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 ??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111202/25ec9e3d/attachment.html>
More information about the Tutor
mailing list