[Tutor] (no subject)

singh000taran at gmail.com
Sun Mar 14 08:52:36 EDT 2021


I am writing the question again in a more readable form.


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.

On Sun, Mar 14, 2021 at 5:52 PM ੧ <singh000taran at gmail.com> wrote:

> 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.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


-- 
TaranSingh


More information about the Tutor mailing list