Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- down casting
- dbeaver
- has-a
- pycharm
- 넘파이
- Java
- 엔드포인트
- 파이참
- ai능력시험
- 스트림
- 얕은 복사
- 파이썬
- Python
- public static final
- generic programming
- parameter group
- singletone
- Inbound
- arraycopy
- aice associate
- extends
- 셔뱅
- pandas
- access modifier
- 자바
- Aice
- Stream
- identityHashCode
- Up Casting
- 판다스
Archives
- Today
- Total
٩(๑•̀o•́๑)و
map 본문
- list(map(함수, 리스트))
- tuple(map(함수, 튜플))
a = (2.3, 3, 4.7, 5.2)
b = list(map(str, a))
c = tuple(map(int, a))
print('a : ', a)
print('b : ', b)
print('c : ', c)
====Result====
a : (2.3, 3, 4.7, 5.2)
b : ['2.3', '3', '4.7', '5.2']
c : (2, 3, 4, 5)
# map & input & split
a = map(int, input().split())
print(list(a))
b = list(map(str, input().split(',')))
print(b)
====Result====
1 2 3 4 5
[1, 2, 3, 4, 5]
0,9,8,7,7
['0', '9', '8', '7', '7']
'Python' 카테고리의 다른 글
| 2차원 리스트, 튜플 (0) | 2020.09.10 |
|---|---|
| tuple (0) | 2020.09.10 |
| list (0) | 2020.09.09 |
| break, continue (0) | 2020.09.09 |
| while (0) | 2020.09.09 |