Bro I have a doubt You didn't give value to the list you directly given a and g could you clear my doubt
@Code_With_Naveen5 күн бұрын
yeah brother a=[ ] initially i am creating an empty list to store the characters of string s for i in s: a.append(i) with the help of for loop i am iterating the characters and appending(adding) it to the list example initially s="tata" a=[ ] then for loop will start in the first iteration the list will become - > a=['t'] in the second iteration the list will become - > a=['t','a'] in the second iteration the list will become - > a=['t','a','t'] in the second iteration the list will become - > a=['t','a','t','a'] then loop ends ,this is how we are adding values to the list a, like wise this will happen for b clear borther?