strip
Remove the specified character or character sequence at the beginning and end of the string
type
The data type of the output variable
count
Statistics specify the starting point or the ending point , The number of occurrences of a character or substring
insert
Inserts the specified object into the list at the specified location
sep
Custom delimiter , Commonly used in print Function
score = []
avg = []
for i in range(0, 4):
score.append([0] * 3)
for i in range(0, 4):
for j in range(0, 3):
score[i][j] = int(input())
avg[i] += score[i][j]
for i in range(0, 4):
print(avg[i])
year = int(input("Please input a year"))
if year % 4 == 0 and year % 100 != 0 or year % 400 == 0:
print(year,' It's a leap year ')
else:
print(year,' It's the year of the year ')
def swap(a, b):
t = a
a = b
b = t
print(a, b)
for x in range(1, 10):
for y in range(0, 10):
for z in range(0, 10):
s1 = x * 100 + y * 10 + z
s2 = x**3 + y**3 + z**3
if s1 == s2:
print(s1)
file = open('C:/a.txt','w+')
a = "123456"
file.write(a)
file.close()