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 | 31 |
Tags
- 넘파이
- down casting
- 엔드포인트
- 파이썬
- pycharm
- 셔뱅
- 파이참
- 스트림
- 얕은 복사
- generic programming
- public static final
- Inbound
- dbeaver
- Python
- 자바
- singletone
- has-a
- pandas
- parameter group
- arraycopy
- access modifier
- aice associate
- Aice
- Java
- ai능력시험
- extends
- identityHashCode
- 판다스
- Stream
- 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 |