teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

修正

2018/06/13 14:58

投稿

LouiS0616
LouiS0616

スコア35678

answer CHANGED
@@ -1,24 +1,24 @@
1
- 要素1のタプルを扱っているのです。
1
+ 要素1のタプルを扱っているのです。
2
2
  ```Python
3
- >>> a = 1
3
+ >>> a = 42
4
4
  >>> print(a, type(a))
5
- 1 <class 'int'>
5
+ 42 <class 'int'>
6
6
  >>>
7
- >>> a = (1)
7
+ >>> a = (42)
8
8
  >>> print(a, type(a))
9
- 1 <class 'int'>
9
+ 42 <class 'int'>
10
10
  >>>
11
- >>> a = (1,)
11
+ >>> a = (42,)
12
12
  >>> print(a, type(a))
13
- (1,) <class 'tuple'>
13
+ (42,) <class 'tuple'>
14
14
  ```
15
15
 
16
16
  ```Python
17
- >>> b = (1,)
17
+ >>> b = (42,)
18
18
  >>> print(b, type(b))
19
- (1,) <class 'tuple'>
19
+ (42,) <class 'tuple'>
20
20
  >>>
21
- >>> b, = (1,)
21
+ >>> b, = (42,)
22
22
  >>> print(b, type(b))
23
- 1 <class 'int'>
23
+ 42 <class 'int'>
24
24
  ```