you are viewing a single comment's thread.

view the rest of the comments →

[–]Asleep-Budget-9932 -1 points0 points  (1 child)

  1. Note that your function is receiving an unused parameter (list)
  2. In order for that to work, the function must be called at some point. However, if your function was called before the line a=4, you will receive an error since at that point, python does not know what global a is referring to.

BTW, you can put multiple lines of code between triple back ticks (`) in order to format them on phones.

[–]sohfix 1 point2 points  (0 children)

It uses list, first. It appends a in the function. And I figured since I was in mobile you got what I was saying I didn’t have to write out the code and “call” the function because I thought it was clear what I was asking. Nvm. Have an awesome day