0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Pythonで「変数の定義と値の代入」の動作を確認してみた

Posted at

概要

Pythonで「変数の定義と値の代入」の動作を確認してみました。以下のページを参考にしました。

実装

以下のファイルを作成しました。

sample.py
old = 24
str = "Hello"
colorlist = ["red", "blue", "yerllow"]
num = 10
print(num)
address2019 = "Tokyo"
print(address2019)
年齢=25
print(年齢)
str = "Hello"
STR = "Python"
print(str, STR)
name = "Yamada"
name = "Tarou"
personal = "Yamada"
personal = 24
personal = "Yamada"
print(personal)
personal = "Tarou"
print(personal)
personal = 24
print(personal)
num = 10
print(num + 5)
name1 = "Yamada"
print("name1=" + name1)
name2 = name1
print("name1=" + name1)
print("name2=" + name2)
name1 = "Suzuki"
print("name1=" + name1)
print("name2=" + name2)

以下のコマンドを実行しました。

$ python3 sample.py 
10
Tokyo
25
Hello Python
Yamada
Tarou
24
15
name1=Yamada
name1=Yamada
name2=Yamada
name1=Suzuki
name2=Yamada

まとめ

何かの役に立てばと。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?