I'm trying to split a string at its commas in Python at the moment and I'm getting the error main() missing 1 required positional argument: 'self'
This is what I have as of right now.
def main(self):
last_letters('Ani,Trevor,Karen,Jasmine,Ryan')
def last_letters(self):
last_letters1 = last_letters.split(",")
if __name__ == '__main__':
main()
EDIT:
After I remove self
from the def, I am still left with this error--
`Traceback (most recent call last):
File "/home/main.py", line 13, in <module>
main()
File "/home/main.py", line 2, in main
last_letters('Ani,Trevor,Karen,Jasmine,Ryan')
TypeError: last_letters() takes 0 positional arguments but 1 was given
`