Discuss / Python / 课后习题

课后习题

Topic source
# -*- coding: utf-8 -*-
L = ['Bart', 'Lisa', 'Adam']
for i in L:
	print("Hello, {}!".format(i))
	print("Hello, %s!" % i)
	print(f"Hello, {i}!")


n = 0
while n < 10:
	n = n + 1
	if n % 2 == 0 and n > 8:
		# print(n)
		break
	print(n)

  • 1

Reply