Skip to content

Instantly share code, notes, and snippets.

@lbxa
Created March 4, 2017 15:15
Show Gist options
  • Select an option

  • Save lbxa/f1fffd283a88f9fbf80639ca5046c119 to your computer and use it in GitHub Desktop.

Select an option

Save lbxa/f1fffd283a88f9fbf80639ca5046c119 to your computer and use it in GitHub Desktop.
PyJoinParadigm
# Auxilary file for random tests
available = "Banana Split; Hot Fudge; Cherry; Malted; Black and White"
sundaes = available.split(";")
'''
<str_sep>.join(<str_list>)
- string method
'''
display_menu = ", ".join(sundaes)
menu = "Our available flavors are {}".format(display_menu)
print(menu)
@lbxa
Copy link
Author

lbxa commented Mar 4, 2017

Caio, the .join() method is a string method, not a list method....we were doing things the wrong way around!
it should be:

available = "Banana Split; Hot Fudge; Cherry; Malted; Black and White"
sundaes = available.split(";")
  display_menu = ", ".join(sundaes)
menu = "Our available flavors are {}".format(display_menu)
print(menu)

@lbxa
Copy link
Author

lbxa commented Mar 4, 2017

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