当我试图同时打印str和len()时,会不断出现SyntaxError。请告知
companies = [['Google', 'Facebook', 'Apple'],
['Warner Bros. Pictures', '20th Century Fox', 'Universal Pictures'],
['Whole foods', 'Starbucks', 'Walmart']]
for x in range(len(companies)):
for y in range(len(companies[x])):
print("This company name has length of:" + " " + str(len(companies[x][y]))
你刚刚错过了一个右括号
相关问题 更多 >
编程相关推荐