「Python」辞書の要素を出力するサンプル
書式
print(辞書名)
使用例
cft = {
"username": "yamada",
"city": "tokyo",
"age": 21
}
print(cft)
cft = {
"username": "yamada",
"city": "tokyo",
"age": 21
}
print(cft)
cft = { "username": "yamada", "city": "tokyo", "age": 21 } print(cft)
結果
{'username’: 'yamada’, 'city’: 'tokyo’, 'age’: 21}