[关闭]
@aloyschen 2017-10-16T15:42:51.000000Z 字数 769 阅读 86

CodeWars 刷题总结

CodeWars


My Very Own Python's Split Function

Quite recently it happened to me to join some recruitment interview, where my first task was to write own implementation of built-in split function. It's quite simple, is it not?

However, there were the following conditions:

  1. the function cannot use, in any way, the original split or rsplit functions,
  2. the new function must be a generator,
  3. it should behave as the built-in split, so it will be tested that way -- think of split() and split('')

This Kata will control if the new function is a generator and if it's not using the built-in split method, so you may try to hack it, but let me know if with success, or if something would go wrong!

Enjoy!

知识点

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注