[Tutor] (no subject)

singh000taran at gmail.com
Sun Mar 14 07:53:32 EDT 2021


Respected sir, please guide me with the question given below. I don't fully
understand the question.
Write a python program to read from input a string. The input contains
COMMA separated string values. The output of the program is the count of
string values where (a) the length is >= 2; AND (b) the first and last
character of the string value are the same. Input: abc,xyz,aba,1221,1
Output: 2 Input: abc, xyz , alpha Output: 1 [Note that the second string (
xyz ) has SPACE at the start and at the end; while the last string ( alpha)
has SPACE only at the start.


More information about the Tutor mailing list