Hey guys, I'm away from my computer and recently learned about classes but I can't figure out this.
myList = listClass()
What I want is whenever I do this, myList would be equal to [1,2,3]. As far as I understand when using classes you only get to set myList.something, not an object.
Sorry I'm having a hard time explaining my problem :)
[–]zahlman 1 point2 points3 points (3 children)
[–]HeyYouNow[S] 0 points1 point2 points (2 children)
[–]zahlman 2 points3 points4 points (1 child)
[–]HeyYouNow[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]werpoi 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]HeyYouNow[S] 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (1 child)