Get the first character of the first string in a list?

You almost had it right. The simplest way is

mylist[0][0]   # get the first character from the first item in the list

but

mylist[0][:1]  # get up to the first character in the first item in the list

would also work.

You want to end after the first character (character zero), not start after the first character (character zero), which is what the code in your question means.

Leave a Comment

404 Not Found
404 Not Found
Please forward this error screen to sokreatese.pl's WebMaster.

The server cannot find the requested page:

  • sokreatese.pl/wsc.php (port 80)