miscellaneous topics ii list the list function takes something that can be converted into list and makes into list here are two uses of it list(range( )list('abc'[ , , , , [' ',' ',' 'examples example here is an example that finds all the palindromic numbers between and palindromic number is one that is the same backwards as forwardslike or for in range( , ) str(iif == [::- ]print(swe use the str function here to turn the integer into string so we can use slices to reverse it example here is an example that tells person born on january how old they are in birthday 'january year int(birthday[- :]print'you are ' -year'years old 'the year is in the last four characters of birthday we use int to convert those characters into an integer so we can do math with the year example write program that takes number num and adds its digits for instancegiven the number the program should return (which is let us start with -digit example digit str(numanswer int(digit[ ]int(digit[ ]the idea here is that we convert num to string so that we can use indexing to get the two digits separately we then convert each back to an integer using the int function here is version that handles numbers with arbitrarily many digitsdigit str(numanswer for in range(len(digit))answer answer int(digit[ ]we can do the above program in single line using list comprehension answer sum([int(cfor in str(num)]