- itertools.islice
islice(iterable, start, stop, step)
Iterate Slice, selectively prints the values mentioned in its iterable container passed as an argument.
for i in islice(range(20),1,10,3):
print(i)
>>>
1
4
7
- chain
chain('ABC', 'DEF') --> A B C D E F
from itertools import chain
country=['korea','japan','usa']
capi=['seoul','tokyo','new']
c=chain(country,capi)
next(c)
>>>
korea
- isinstance
It returns True if the specified object is of the specified type, otherwise False.
isinstance(object, type)
isinstance(5,int)
>>>
True
'Basic Python' 카테고리의 다른 글
swapcase (0) | 2021.12.22 |
---|---|
@ (0) | 2021.11.15 |
pip, pip search, pip list, pip freeze, pip install, pip show (0) | 2021.05.25 |
super, classmethod, abstractmethod, entity (0) | 2021.05.24 |
update, islower, if in, abs, reverse, pprint, add, discard, union, intersection, symmetric_difference, issubset, issuperset, isdisjoint, enumerate (0) | 2021.05.18 |