Discuss / Python / practice quiz

practice quiz

Topic source

autonote

#1 Created at ... [Delete] [Delete and Lock User]

L = ['Michael', 'Sarah', 'Tracy', 'Bob', 'Jack'] print(L[0:3]) print(L[-1]) print(L[-2:]) print(L[-2:-1])

S= list(range(100)) print(S[:10]) print(S[-10:]) print(S[0:10:2]) print(S[10:90:5]) s = 'ABCDEFGHIJKLMN' print(s[:3]) print(s[::2])


  • 1

Reply