...

View Full Version : Question about python function., about ""-marks



runeazn
01-10-2012, 07:02 PM
So when i type
a = [1]

a.append ("lol")
i get a = [1, 'lol']

when using a.append (lol)
i get a = [1, lol]

I wonder does the interpreter think the lol are different things or what?
what does the ""-marks add for difference to the interpreter?

sean3838
01-11-2012, 10:05 PM
So when i type
a = [1]

a.append ("lol")
i get a = [1, 'lol']

when using a.append (lol)
i get a = [1, lol]

I wonder does the interpreter think the lol are different things or what?
what does the ""-marks add for difference to the interpreter?

Oh good ole python. Don't use append you have to write to replace the 1 with lol

a.write("lol")

runeazn
01-14-2012, 03:59 PM
thats not what i meant

i mean when i type ("lol") i get 'lol'
and when i type (lol) i get lol
whats the difference between these two?

those quote marks must mean something for the interpreter.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum