0

Quick question:

disc_list=[] #creating an empty list to put the discs into
    rad = 70
for i in range(5):
    disc_list.append(cmds.polyCylinder( name = 'disc' + str(i), radius = rad, height = 10)[0]) # create discs
    cmds.move(0, 10*i, 0, ('disc' + str(i)))
    rad = rad*0.7 

    print disc_list

anyone know why when I print the disc_list, this is returned:

[u'disc0', u'disc1', u'disc2', u'disc3', u'disc4']

where has the u come from?

Bruno Gelb
  • 5,322
  • 8
  • 35
  • 50
heather
  • 109
  • 1
  • 2
  • 10
  • when i first saw this I had the same question. It just denotes that the string is unicode as sshashank124 states below – Drewdin Apr 27 '14 at 15:07

1 Answers1

1

The u simply denotes that it is a unicode string. You should not worry about it. When you print it, it will still be the same.

for i in disc_list:
    print i

[OUTPUT]
disc0
disc1
disc2
disc3
disc4

Suggested link

Community
  • 1
  • 1
sshashank124
  • 31,495
  • 9
  • 67
  • 76