Skip to content

Instantly share code, notes, and snippets.

@artsi0m
Last active August 16, 2021 17:23
Show Gist options
  • Select an option

  • Save artsi0m/57a5924dbb1ca43a33037a06afd5e1b6 to your computer and use it in GitHub Desktop.

Select an option

Save artsi0m/57a5924dbb1ca43a33037a06afd5e1b6 to your computer and use it in GitHub Desktop.
My codewars snippets
################################################################
# https://docs.python.org/3/tutorial/datastructures.html
# https://docs.python.org/3/howto/sorting.html
# https://docs.python.org/3/library/stdtypes.html
def array_diff(a, b):
c = []
for el in a:
if el not in b:
c.append(el)
return c
################################################################
# https://pyformat.info/
# https://docs.python.org/3/library/functions.html?highlight=slice
# https://docs.python.org/3/faq/design.html#why-are-python-strings-immutable
# stackoverflow.com/
# questions/12169839/which-is-the-preferred-way-to-concatenate-a-string-in-python
# stackoverflow.com/
# questions/60497971/how-can-i-slice-out-the-last-and-first-characters-of-a-string-in-python
def to_jaden_case_word(word):
capital_letter = ''
capital_letter = word[:1].capitalize()
str = '{}{}'
return str.format(capital_letter, word[1::1] )
def to_jaden_case(string):
str = ''
for word in string.rsplit(' '):
_word = to_jaden_case_word(word)
__word = '{} '
str += __word.format(_word)
return str[0:-1]
@artsi0m
Copy link
Author

artsi0m commented Aug 12, 2021

@artsi0m
Copy link
Author

artsi0m commented Aug 12, 2021

You can write here if you think that it should be private gist.

@artsi0m
Copy link
Author

artsi0m commented Aug 16, 2021

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