你几乎是对的。最简单的方法是
mylist[0][0] # get the first character from the first item in the list
但
mylist[0][:1] # get up to the first character in the first item in the list
也可以。
Python:获取列表中第一个字符串的第一个字符?
你几乎是对的。最简单的方法是
mylist[0][0] # get the first character from the first item in the list
但
mylist[0][:1] # get up to the first character in the first item in the list
也可以。