Вы находитесь на странице: 1из 2

Python Codes

nums = [1, 2, 3]
nums.append(4)
print(nums)

nums = [1, 2, 3]
print(nums + [4, 5, 6])
print(nums * 3)
myfile = open("filename.txt")

file = open("filename.txt", "r")


cont = file.read()
print(cont)
file.close()
append

list
Open text

read file

Вам также может понравиться