LogIn E-mail
설계이야기
2차원 리스트, 튜플
# 20 JMJS    19.11.13 10:29

Matrix = [[0]*5 for i in range(5)]
Matrix[0][0] = 1
Matrix[4][0] = 5

>>> a = []
>>> a.append([])
>>> a[0].append(10)
>>> a[0].append(20)
>>> a.append([])
>>> a[1].append(500)
>>> a[1].append(600)
>>> a[1].append(700)
>>> a
[[10, 20], [500, 600, 700]]

a = ((10, 20), (30, 40), (50, 60))
b = ([10, 20], [30, 40], [50, 60])
c = [(10, 20), (30, 40), (50, 60)]

게시물: 21 건, 현재: 1 / 1 쪽
번호 제       목 작성자 등록일 방문
22  python -m pip install -U pip JMJS 19.11.25 3
21  get =lambda i,m ... JMJS 19.11.13 7
20  2차원 리스트, 튜플 JMJS 19.11.13 7
19  [turtle]def polygon3(n,c,d) JMJS 19.11.11 8
18  [turtle]def polygon2(n,a) JMJS 19.11.11 7
17  def factorial(n) JMJS 19.11.11 7
16  def sum_func(n) JMJS 19.11.11 7
15  def hello() fun1(a) fun2(a,b) JMJS 19.11.11 7
14  while sum JMJS 19.11.11 7
13  random calculation JMJS 19.11.11 7
12  turtle random JMJS 19.11.11 7
11  import time time.time JMJS 19.11.11 7
10  turtle begin_fill end_fill JMJS 19.11.11 7
9  if else JMJS 19.11.11 7
8  input JMJS 19.11.11 8
7  list JMJS 19.11.11 7
6  turtle triangle JMJS 19.11.11 7
5  for range JMJS 19.11.11 7
4  모듈 사용하기 JMJS 19.11.11 8
3  import 파이썬 모듈 가져다 쓰기 JMJS 19.11.11 10
1  print 줄바꿈 JMJS 19.11.11 35
[1]