On Sat, 4 Jun 2016 09:06 am, Sayth Renshaw wrote:

> I cant create a list with an append method pf.append(thing) in one go .

Correct. You cannot append to a list until the list exists.

Nor can you uppercase a string until the string exists:

s = "hello world"
s = s.uppercase()


Nor can you add one to a number until the number exists.

x = 0
x += 1


Why should lists be different? How is Python supposed to know pf is a list
with an append method if pf doesn't exist?

# pf = []
pf.append(thing)



-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to