Python Python Collections Slices sillyCase

Vladimir Lapcevic
Vladimir Lapcevic
6,261 Points

how to divide the argument in two halfs?

What should be my next step?

sillycase.py
def sillycase(one):

1 Answer

Steven Parker
Steven Parker
168,153 Points

Here's a few hints:

  • getting the length of the string and dividing that by 2 would give you the size of half
  • be sure to use integer division, characters can't be split
  • a slice is a good way to get just part of a string
  • concatenation ("+") can join string parts back together