File name
Commit message
Commit date
File name
Commit message
Commit date
{
"cells": [
{
"cell_type": "code",
"execution_count": 33,
"id": "72425bc5",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1,)"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t1 = (1, )\n",
"t1"
]
},
{
"cell_type": "code",
"execution_count": 34,
"id": "1b714f42",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1, 2, 3)"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Tuple Must in '()'\n",
"t2 = (1, 2, 3)\n",
"t3 = 1, 2, 3\n",
"t2\n",
"t3"
]
},
{
"cell_type": "code",
"execution_count": 35,
"id": "7102fafb",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1, 2, (3, 4), ('Life', 'is'))"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t4 = (1, 2, (3, 4), ('Life', 'is'))\n",
"t4"
]
},
{
"cell_type": "code",
"execution_count": 36,
"id": "7ef38820",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t4[2][-1]"
]
},
{
"cell_type": "code",
"execution_count": 37,
"id": "13b2d9c0",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1, 1, 2, 3)"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t1 + t2"
]
},
{
"cell_type": "code",
"execution_count": 38,
"id": "48625967",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1, 2, 3, 1, 2, 3, 1, 2, 3)"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t2 * 3"
]
},
{
"cell_type": "code",
"execution_count": 39,
"id": "c948876e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'Hong', 'phone': '01012345678', 'birth': '0814'}"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic = {'name':'Hong', 'phone':'01012345678', 'birth':'0814'}\n",
"dic"
]
},
{
"cell_type": "code",
"execution_count": 40,
"id": "24a5d503",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Hong'"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic['name']"
]
},
{
"cell_type": "code",
"execution_count": 41,
"id": "5209ec19",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'01012345678'"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic['phone']"
]
},
{
"cell_type": "code",
"execution_count": 42,
"id": "8c66ad44",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'0814'"
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic['birth']"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "d75ac067",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'Hong', 'phone': '01012345678', 'birth': '0814', 1: 'a'}"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic[1] = 'a'\n",
"dic"
]
},
{
"cell_type": "code",
"execution_count": 44,
"id": "1c9a62b8",
"metadata": {},
"outputs": [],
"source": [
"dic['pet'] = 'dog'"
]
},
{
"cell_type": "code",
"execution_count": 45,
"id": "28e960d9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'Hong', 'phone': '01012345678', 'birth': '0814', 1: 'a', 'pet': 'dog'}"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic"
]
},
{
"cell_type": "code",
"execution_count": 46,
"id": "94836ccf",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'Hong', 'phone': '01012345678', 'birth': '0814', 'pet': 'dog'}"
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"del dic[1]\n",
"dic"
]
},
{
"cell_type": "code",
"execution_count": 47,
"id": "9d650023",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"dict_keys(['name', 'phone', 'birth', 'pet'])"
]
},
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic.keys()"
]
},
{
"cell_type": "code",
"execution_count": 48,
"id": "979161a7",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['name', 'phone', 'birth', 'pet']"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"list(dic.keys())"
]
},
{
"cell_type": "code",
"execution_count": 49,
"id": "ebb6e9e3",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"dict_values(['Hong', '01012345678', '0814', 'dog'])"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic.values()"
]
},
{
"cell_type": "code",
"execution_count": 50,
"id": "d0d7892b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['Hong', '01012345678', '0814', 'dog']"
]
},
"execution_count": 50,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"list(dic.values())"
]
},
{
"cell_type": "code",
"execution_count": 51,
"id": "a9001930",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"dict_items([('name', 'Hong'), ('phone', '01012345678'), ('birth', '0814'), ('pet', 'dog')])"
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic.items()"
]
},
{
"cell_type": "code",
"execution_count": 52,
"id": "4e542b31",
"metadata": {},
"outputs": [],
"source": [
"dic[4] = 'b'"
]
},
{
"cell_type": "code",
"execution_count": 53,
"id": "b5498318",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'Hong', 'phone': '01012345678', 'birth': '0814', 'pet': 'dog', 4: 'b'}"
]
},
"execution_count": 53,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic"
]
},
{
"cell_type": "code",
"execution_count": 54,
"id": "fe6c03cf",
"metadata": {},
"outputs": [],
"source": [
"dic[1] = 'a'"
]
},
{
"cell_type": "code",
"execution_count": 55,
"id": "993e32a4",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'Hong',\n",
" 'phone': '01012345678',\n",
" 'birth': '0814',\n",
" 'pet': 'dog',\n",
" 4: 'b',\n",
" 1: 'a'}"
]
},
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic"
]
},
{
"cell_type": "code",
"execution_count": 56,
"id": "dd837c27",
"metadata": {},
"outputs": [],
"source": [
"dic['area'] = 'kr'"
]
},
{
"cell_type": "code",
"execution_count": 57,
"id": "ca182035",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'Hong',\n",
" 'phone': '01012345678',\n",
" 'birth': '0814',\n",
" 'pet': 'dog',\n",
" 4: 'b',\n",
" 1: 'a',\n",
" 'area': 'kr'}"
]
},
"execution_count": 57,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dic"
]
},
{
"cell_type": "code",
"execution_count": 58,
"id": "caeedcc4",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c4a84a53",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "ae7cd89b",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "dade6dc3",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "bebcd6c7",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "d47497b4",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "1253420a",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "b2a2618f",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "32ba3a15",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "2f5a27b1",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "eb7fbfb7",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "e76d80c4",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}