1)
2) No it will not work - BUT - globals are very very bad things
3) Passing
Now part of your problem of course is you have a lot of variables so perhaps making this into a class would be better
from Library import SpecificFunction
--or-- if you actually need the entire library (which is highly unlikely) just import Library
2) No it will not work - BUT - globals are very very bad things
3) Passing
stud_dict1
into auto_refresh()
as follows auto_refresh(stud_dict1)
Now part of your problem of course is you have a lot of variables so perhaps making this into a class would be better
class studentstuff: self.stud_dict1 = {str(row[1]): row[0] for _, row in pd.read_csv('1st hour.csv').iterrows()} etc... def update_lists(): if self.cur_per == 1 and self.roster != self.stud_dict1:-- or basically something to that effect -- aka read up on classes and such