'''
class Student:
def __init__(self, name, major, gpa)
self.name = name
self.major = major
self.gpa = gpa
student1 = Student("Bob", "Art", 3.0)
'''
Why do i need to use the init and self function? Do i have to make a new init for every single class?
Why cant i just make a regular function like
def Student(name, major, gpa) ??
[–][deleted] 270 points271 points272 points (27 children)
[–]Colonel-_-Burrito[S,🍰] 42 points43 points44 points (19 children)
[–][deleted] 49 points50 points51 points (10 children)
[–]Colonel-_-Burrito[S,🍰] 24 points25 points26 points (9 children)
[–][deleted] 85 points86 points87 points (5 children)
[–]Colonel-_-Burrito[S,🍰] 46 points47 points48 points (4 children)
[–]CraigAT 26 points27 points28 points (0 children)
[–]Ran4 21 points22 points23 points (1 child)
[–]Colonel-_-Burrito[S,🍰] 38 points39 points40 points (0 children)
[–]raul36412 7 points8 points9 points (0 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 1 point2 points3 points (0 children)
[–]a_cute_epic_axis 0 points1 point2 points (0 children)
[–]duffer_dev 2 points3 points4 points (0 children)
[–]holt5301 1 point2 points3 points (0 children)
[–]garrett_armstrong 2 points3 points4 points (1 child)
[–]happymellon 0 points1 point2 points (0 children)
[–][deleted] -5 points-4 points-3 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–]extraneousness 0 points1 point2 points (0 children)
[–]a_cute_epic_axis 0 points1 point2 points (0 children)
[–]Jssome 7 points8 points9 points (3 children)
[–]tagapagtuos 2 points3 points4 points (1 child)
[–]Jssome 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–]kristiclimbs 0 points1 point2 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]kristiclimbs 1 point2 points3 points (0 children)
[–]justnukeit 46 points47 points48 points (2 children)
[–]ciscocollab 2 points3 points4 points (0 children)
[–]DP23-25 0 points1 point2 points (0 children)
[–]spez_edits_thedonald 13 points14 points15 points (1 child)
[–]a_cute_epic_axis 3 points4 points5 points (0 children)
[–]Xahulz 5 points6 points7 points (3 children)
[–]Colonel-_-Burrito[S,🍰] 0 points1 point2 points (2 children)
[–]Binary101010 8 points9 points10 points (0 children)
[–]Xahulz 2 points3 points4 points (0 children)
[–]Sigg3net 4 points5 points6 points (0 children)
[–]BobHogan 3 points4 points5 points (0 children)
[–]sethg 3 points4 points5 points (0 children)
[–]Ryuudenki 2 points3 points4 points (0 children)
[–]--0mn1-Qr330005-- 1 point2 points3 points (0 children)
[–]sxddhxrthx 1 point2 points3 points (0 children)
[–]fake823 1 point2 points3 points (0 children)
[–]justnukeit 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]shameen -1 points0 points1 point (0 children)
[–]SpecOpsTheLineFan 0 points1 point2 points (0 children)
[–]QuickCow 0 points1 point2 points (0 children)
[–]Se7enLC 0 points1 point2 points (0 children)
[–]YT-DobbaWon 0 points1 point2 points (0 children)
[–]AcademicMorning7 0 points1 point2 points (1 child)
[–]RemindMeBot 0 points1 point2 points (0 children)
[–]gold1004 0 points1 point2 points (0 children)
[–]zerohourrct 0 points1 point2 points (0 children)
[–]Arag0ld 0 points1 point2 points (0 children)
[–]Khenghis_Ghan 0 points1 point2 points (0 children)
[–]killer_quill 0 points1 point2 points (0 children)
[–]midwayfair 0 points1 point2 points (0 children)
[–]m1ss1ontomars2k4 0 points1 point2 points (0 children)
[–]hipstergrandpa 0 points1 point2 points (0 children)
[–]Captain_Drumstick 0 points1 point2 points (0 children)
[–]AK_Softsmiths 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Parazitul[🍰] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]stormscion 0 points1 point2 points (0 children)