(1)六种数据类型:?

?---------------------------------------------------------------------------
?(2)for循环
demo1如下(注意看print):
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
for i in range(0,10):
print('Hi, {name} %d' %i) # Press Ctrl+F8 to toggle the breakpoint.
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi('PyCharm')

--------------------------------------------------------------------------------?
?demo2如下(注意看print):
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
for i in range(0,10):
print(f'Hi, {name} %d' %i) # Press Ctrl+F8 to toggle the breakpoint.
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi('PyCharm')

?
|