Skip to content

Instantly share code, notes, and snippets.

@RyanCCollins
Created December 15, 2018 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanCCollins/b4b9387040ffcf4abaa72d3d2fa14c57 to your computer and use it in GitHub Desktop.
Save RyanCCollins/b4b9387040ffcf4abaa72d3d2fa14c57 to your computer and use it in GitHub Desktop.
Just a code example
class Student:
def __init__(self, name, student_id=332):
self.name = name
self.student_id = student_id
def __str__(self):
return "Student: " + self.name
def get_name_capitalized(self):
return self.name.capitalize()
students = []
student = Student("Ryan Collins", 777)
students.append(student)
print(students[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment