n = inputsplitfor i in n if t == F printTrue breakelse printFalse这段代码哪里错了帮我改一改pythonpython
There are a few errors in the code you provided. Here's the corrected version:
n = input().split()
for t in n:
if t == 'F':
print("True")
break
else:
print("False")
Changes made:
- Added
tas the loop variable in theforloop. - Corrected the condition in the
ifstatement fromttot == 'F'.
原文地址: https://www.cveoy.top/t/topic/hGBt 著作权归作者所有。请勿转载和采集!