Results of 1 - 2 of about 2 for fruits (0.002 sec.)
- 5. データ構造 — Python 3.14.8 ドキュメント 9357
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 5. データ構造 テーマ 自動 ライト ダーク | 5. データ構造 ¶ この章では、すでに学んだことについてより詳しく説明するとともに、いくつか新しいこ
...py ( ) リストの浅い (shallow) コピーを返します。 a[:] と同様です。 以下にリストのメソッドをほぼ全て使った例を示します: >>> fruits = [ 'orange' , 'apple' , 'pear' , 'banana' , 'kiwi' , 'apple' , 'banana' ] >>> fruits . count ( 'apple' ) 2 >>> fruits . c...ount ( 'tangerine' ) 0 >>> fruits . index ( 'banana' ) 3 >>> fruits . index ( 'banana' , 4 ) # インデックス4から数えて次の banana の位置 6 >>> fruits . reve...rse () >>> fruits ['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange'] >>> fruits . append ( 'grape' ) >>> fruits ['banana', 'ap... - https://man.mtool.work/python/3.14/tutorial/datastructures.html
- 5. データ構造 — Python 3.14.8 ドキュメント 9357
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 5. データ構造 テーマ 自動 ライト ダーク | 5. データ構造 ¶ この章では、すでに学んだことについてより詳しく説明するとともに、いくつか新しいこ
...py ( ) リストの浅い (shallow) コピーを返します。 a[:] と同様です。 以下にリストのメソッドをほぼ全て使った例を示します: >>> fruits = [ 'orange' , 'apple' , 'pear' , 'banana' , 'kiwi' , 'apple' , 'banana' ] >>> fruits . count ( 'apple' ) 2 >>> fruits . c...ount ( 'tangerine' ) 0 >>> fruits . index ( 'banana' ) 3 >>> fruits . index ( 'banana' , 4 ) # インデックス4から数えて次の banana の位置 6 >>> fruits . reve...rse () >>> fruits ['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange'] >>> fruits . append ( 'grape' ) >>> fruits ['banana', 'ap... - https://man.mtool.work/python/3.14/tutorial/datastructures.html
PREV
1
NEXT