回答編集履歴

3

変数のid追加

2020/01/01 08:59

投稿

shiracamus
shiracamus

スコア5406

test CHANGED
@@ -46,4 +46,16 @@
46
46
 
47
47
  123145296635696
48
48
 
49
+ >>> id(x)
50
+
51
+ 15912045152
52
+
53
+ >>> id(y)
54
+
55
+ 15912045088
56
+
57
+ >>> id(func)
58
+
59
+ 123145296635696
60
+
49
61
  ```

2

id表示追加

2020/01/01 08:59

投稿

shiracamus
shiracamus

スコア5406

test CHANGED
@@ -34,4 +34,16 @@
34
34
 
35
35
  <class 'function'>
36
36
 
37
+ >>> id(3)
38
+
39
+ 15912045152
40
+
41
+ >>> id(1)
42
+
43
+ 15912045088
44
+
45
+ >>> id(square)
46
+
47
+ 123145296635696
48
+
37
49
  ```

1

type表示追加

2020/01/01 08:56

投稿

shiracamus
shiracamus

スコア5406

test CHANGED
@@ -22,4 +22,16 @@
22
22
 
23
23
  4
24
24
 
25
+ >>> type(3)
26
+
27
+ <class 'int'>
28
+
29
+ >>> type(1)
30
+
31
+ <class 'int'>
32
+
33
+ >>> type(square)
34
+
35
+ <class 'function'>
36
+
25
37
  ```