docs-isharkfly-com/python-tutorials/sample/LoopClauses.py

24 lines
531 B
Python

# for n in range(2, 10):
# for x in range(2, n):
# if n % x == 0:
# print(n, 'equals', x, '*', n // x)
# break
# else:
# # loop fell through without finding a factor
# print(n, 'is a prime number')
#
# #
# for num in range(2, 10):
# if num % 2 == 0:
# print("Found an even number", num)
# continue
# print("Found a number", num)
# alphabet = ["A", "B", "C"]
# for x in alphabet:
# print(x)
strOssez = "ossez.com"
for x in strOssez:
print(x)