python の配列について
解決したいこと
配列が発生しない理由が知りたい
発生している問題・エラー
member_dict = {
'001': 'ujin'
}
member_name = member_dict['001']
print(f'name is {member_name}.')
member_dict['002'] = 'lee'#追加
new_member_name = member_dict['002']
print(f'new name is {new_member_name}.')
member_dict['001'] = 'bang'#上書き
overwritten_name = member_dict['001']
print(f'next name is {overwritten_name}.')
for key in member_dict:
value = member_dict[key]
print(f'number{key} name is {value}.')
number = len(member_dict)
print(f'member is {number}')
これの結果が
name is ujin.
new name is lee.
next name is bang.
number002 name is lee.
member is 2
となり、配列が表示されない
自分で試したこと
誤字脱字の確認
0