末尾に要素を追加するときappend()を使用
引用元
append.py
fruitList = ['リンゴ', 'オレンジ', 'ナシ']
print(fruitList)
#['リンゴ', 'オレンジ', 'ナシ']
fruitList.append('ブドウ')
print(fruitList)
#['リンゴ', 'オレンジ', 'ナシ', 'ブドウ']
Go to list of users who liked
More than 3 years have passed since last update.
末尾に要素を追加するときappend()を使用
引用元
fruitList = ['リンゴ', 'オレンジ', 'ナシ']
print(fruitList)
#['リンゴ', 'オレンジ', 'ナシ']
fruitList.append('ブドウ')
print(fruitList)
#['リンゴ', 'オレンジ', 'ナシ', 'ブドウ']
Register as a new user and use Qiita more conveniently
Go to list of users who liked