Python Python Collections (2016, retired 2019) Slices sillyCase

Vladimir Lapcevic
Vladimir Lapcevic
6,363 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
171,141 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