loading...

re: Python crash course for non-python programmers VIEW POST

FULL DISCUSSION
 

Great cheatsheet! Thanks a lot! I've been learning for a while but it's always handy to have it summed up. I think there is one misconception regarding deleting items in lists. The description might be misleading:

'Deleting a value is somewhat weird
del numbers[1] # Will delete the value in the appropriate position. "one", "two", "three", "four"]'

del numbers[1] will delete the second item, the description might suggest something else.
del numbers[0] will delete the first one. You just forgot to add "zero" to the numbers list.

Thank you for all the great work. Much appreciated!

 

Thank you. Will update that 😊

code of conduct - report abuse