-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestFile.py
More file actions
38 lines (32 loc) · 874 Bytes
/
TestFile.py
File metadata and controls
38 lines (32 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# print('Hello World!')
# variable='Hello'
# print(f'{variable} World!')
# import datetime
# todayDate = datetime.datetime.today()
# userName = input('What is your name? ')
# print(f'Hello {userName}, today is {todayDate:%A, %B %d, %Y}!')
# # Open function to open the file "MyFile1.txt"
# # (same directory) in append mode (able to write in it) and
# file1 = open("MyFile1.txt","a")
# # store its reference in the variable file1
# # and "MyFile2.txt" in D:\Text in file2 (w+ means you can read and write in it)
# file2 = open(r"D:\Text\MyFile2.txt","w+")
# #File_object.read([n])
# for i in range(0,13,3):
# print(i)
# L=[]
# print(L)
# L.append(6)
# print(L)
# L.append(9)
# print(L)
# M=[10,11,8,6,9]
# L.extend(M)
# print(L)
# for x in L:
# print(x)
# print(L[0])
# print(str(L)[1:-1])
# for i in range(len(L)):
# print(L[i])
# print(L)