mind-palace

Search

Search IconIcon to open search

python

Last updated Sep 19, 2022

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
class TestClass():
	global_variable = "This is a global variable"
	def__init__(self,student="name of student",
	            grade="grade of student",
			    major="major of student"):
	self.name = student
	self.grade = grade
	self.major = major

def __str__(self):

def __ge__(self,other):
'''overloading >='''
	if self.name >= other.name:
	  return True
	else:
	  return False

def _internal_use_only(self):
#can still be called directly
1
2
3
4
5
def main():
    print("Hello World!")

if __name__ == "__main__":
    main()