#K66977. String Symmetry Checker
String Symmetry Checker
String Symmetry Checker
Given a string s
, determine whether it is symmetric. A string is considered symmetric if its length is even and the first half of the string is the mirror image of the second half. If the string has less than 2 characters, the program should output None
. If the string has an odd number of characters, output False
.
For example, the string "abccba" is symmetric because splitting it into "abc" and "cba" produces two mirror images.
inputFormat
A single line that contains the string s
.
outputFormat
Print True
if the string is symmetric, False
if it is not, or None
if the string has fewer than 2 characters.## sample
abccba
True