What is the difference between method and instruction?

Asked

Viewed 24 times

0

I am studying python, and I have seen something I am in doubt, when I add something to a list, I use .(point) but when I delete no, it says it’s a method, when I use .(dot), example: amigos.insert(0, 'colegas de classe'), and when you don’t use the dot? It has a different name, or it remains a method, only without a name?

  • You are citing for example the method l.append(123) and the keyword del l[0] ?

  • Yeah, that’s what I mean.

  • To documentation flame del of "instruction" (in English, statement). The rest can be method or function, the difference of which is already explained in the above questions in the blue box

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.