我一直在努力研究python速成班教材中的实践模块。我在做while循环和输入函数。我试着在终端中运行下面的代码,但是只打印了第二行代码。
What rental car would you like?
完整的代码如下:
while True:
car = input("What rental car would you like?")
print(f'Let me see if I can find you a {car.title()}.')
car += input('Subaru')
break
while
似乎gettext无法正确识别替换字段的Python格式字符串,因此不会将其标记为"python- format“。例如。
ugettext("This is a sample format string with a {kwarg}").format(kwarg='key word argument')
然而,gettext正确地识别具有格式说明符的Python串,并用"python- format“标记这样的源串,例如,
ugettext("This is a sample string with a %(format_spec).&