Quick actions

cmd+k|ctrl+k

Navigation

Languages

6.2

Snippet info

Language

Python

Visibility

public

Author

theanhvo221

Created

2016-10-12T17:35:27Z

Updated

2016-10-12T17:35:49Z

li = ['meo' ,'bo' ,'ga', 'cho', 'chim', 'lon']
print(li[::2])# giai them
print(li[1::2])# giai them
s = zip(li[::2],li[1::2])# giai them
for pair in s:# giai them
    print(pair)# giai them
print([i for i in zip(li[::2], li[1::2])])# list conrihention
INFO