import sys
import json
print("hello world")
items = json.loads('[{"id":1,"text": "item1"},{"id":2,"text": "item2"},{"id":3,"text": "item3"}]')
for item in items:
print(item["text"])
i = 0
while i < len(items):
print(items[i])
i += 1
sum = 0
i = 1
while i <= 100:
sum += i
i+=1
print(f"i={i} sum = {sum}")
i = 1
while i <= 100:
print("第{i}天")
j = 1
while j < 10:
print(f"第{j}次")
j += 1
i += 1
print(f"第{i - 1}天 success")
print 不换行
九九乘法表
i = 1
while i < 10:
j = 1
while j <= i:
print(f"{j} * {i} = {i * j} \t", end= "")
j += 1
print("")
i += 1
for循环
name = "towm"
for c in name:
print(f"{c}\t",end="")
name = "towm"
for c in name:
print(f"{c}\t",end="")
for num in range(10):
print(f"range{num} = {num}")
print("")
for num in range(5,10):
print(f"range{num} = {num}")
print("")
for num in range(1,10,3):
print(f"range{num} = {num}")