places= ["Home","In-n Out Burger", "John's house", "Santa Monica Pier", "Staples center", "LA Dodgers stadium", "Home"]
def placesCount(places):
multi_word = 0
count = 0
while True:
place = places[count]
if ' ' in place and place!='LA Dodgers stadium' **""" or anything that comes after LA dogers stadium"""** :
multi_word += 1
if '' in place and place!='LA Dodgers stadium' """ **or anything that comes after LA dogers stadium**""":
count += 1
print (count, "places to LA dodgers stadium"), print (multi_word)
placesCount(places)
私は基本的に、リストの特定の要素 ( ) に達したときに while ループがリストに追加されないようにする方法を知りたいと思っています"LA Dodgers Stadium"
。リストのその要素に到達した後は、何も追加しないでください。