| about | help | done | prefs | create account |
Python > String-1 > first_half
prev | next | chance
| Given a string of even length, return the first half. So the string "WooHoo" yields "Woo".
first_half('WooHoo') → 'Woo' first_half('HelloThere') → 'Hello' first_half('abcdef') → 'abc' ...Save, Compile, Run See also Python Example Code. Python help docs: Python Strings | Python Lists | Python If Boolean |
Forget It! -- delete my code for this problem 121.0
Copyright Nick Parlante 2006-10 - privacy