Look deeper in a list
x = ['abcd', 'efgh']
print(x) # ['abcd', 'efgh']
print(x[0:1]) # ['abcd']
print(x[0]) # 'abcd'
print(x[0][0]) # a
print(x[0][1]) # b
print(x[0][0:2]) # ab
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
x = ['abcd', 'efgh']
print(x) # ['abcd', 'efgh']
print(x[0:1]) # ['abcd']
print(x[0]) # 'abcd'
print(x[0][0]) # a
print(x[0][1]) # b
print(x[0][0:2]) # ab