Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save quietguyproductions/a30fc5e61c9f92fbf19d8af6e3f8a28b to your computer and use it in GitHub Desktop.
Save quietguyproductions/a30fc5e61c9f92fbf19d8af6e3f8a28b to your computer and use it in GitHub Desktop.
Example Function
def split_on_comma(x):
# replace the code below with code that solves the problem
return x.split(',')
@BGsharpe
Copy link

1 def split_sentence():
2 ("the quick brown fox; likes to hack. The car is annoyed by my keyboard!")
3
4 split_sentence()
The quick brown fox; likes to hack. The cat is annoyed by my keyboard!

this is where i am stuck

@quietguyproductions
Copy link
Author

Screen Shot 2022-03-29 at 2 18 02 PM

@BGsharpe
Copy link

Screenshot 2022-03-29 2 26 06 PM

@BGsharpe
Copy link

Screenshot 2022-03-29 2 30 47 PM

@quietguyproductions
Copy link
Author

Great job figuring out the function definition! The error you're now seeing happens because you passed an invalid argument (an argument is another way of saying "value of an input variable"). I suggest doing a google search for python string methods, or examining the method's help documentation in the terminal

@BGsharpe
Copy link

Screenshot 2022-03-29 2 55 26 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment