person='Mahmoud'
print ("My Name is {} ".format(person))
print(f"second format learned by {person}")
from datetime import datetime
today=datetime(year=2020,month=7,day=11)
print (f"{today}")
library = [('Author', 'Topic', 'Pages'), ('Twain', 'Rafting', 601), ('Feynman', 'Physics', 95), ('Hamilton', 'Mythology', 144)]
for book in library:
print(f"{book[0]:10} {book[1]:10} {book[2]:.>10}")
%%writefile test.txt
this is my first line
this is the second line in the file
myfile= open ('test.txt')
myfile =open('testMAhmoud.txt',mode='w+',encoding='utf-8')
myfile = open ('test2.txt','a+',encoding='utf-8')
myfile.read()
myfile.write('بسم الله الرحمن الرحيم و اللهم إهدني رشدي')
myfile.readlines()
myfile.read()
myfile.seek(0)
myfile.read()
content=myfile.read()
print(content)
myfile.close()
myfile=open('test.txt')
العودة إلي لغة البرمجة البايثون Python