[Tutor] detecing palindromic strings

Kent Johnson kent37 at tds.net
Sat Sep 29 15:28:28 CEST 2007


Christopher Spears wrote:

> my_str = raw_input("Enter a string: ")
>     
> string_list = []
> 
> for s in my_str:
>     string_list.append(s)

This can be written:
string_list = list(my_str)

Kent


More information about the Tutor mailing list