Skip to content

Instantly share code, notes, and snippets.

@rmehta
Created January 25, 2016 15:37
Show Gist options
  • Save rmehta/bb675996274ee78924b8 to your computer and use it in GitHub Desktop.
Save rmehta/bb675996274ee78924b8 to your computer and use it in GitHub Desktop.
# you can selectively import objects from different files like this:
from houses import all_houses
from students import all_students
def sort(student):
for house in all_houses:
if house.ability == student.ability:
if house.students is None:
house.students = []
house.students.append(student)
print student.name + ' goes to ' + house.name + '!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment