-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patha3.py
More file actions
58 lines (52 loc) · 1.01 KB
/
a3.py
File metadata and controls
58 lines (52 loc) · 1.01 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# fruit='banana'
# print(fruit)
# print('fruit')
# print(fruit[2])
# for letter in fruit:
# print(letter)
# ff='Hello PVP'
# dd=ff.replace('PVP', 'PP')
# print(ff)
# print(dd)
# ff.startswith('Hello')
# f=ff.startswith('Hello')
# print(f)
# x='Hello, how are you? '
# x=x.find(',')
# print(x)
# a3=x[7] #find 8th letter
# print(a3)
# a4=x[7:10] #find 8,9,10 letter
# print(a4)
# a5=len(a4)
# print(a5)
# a6=type(a5)
# print(a6)
# a7=x+' '+ 'where are u?'
# print(a7)
# a8='THNX'
# a9=a7+' '+a8
# print(a9)
#
# x = '40'
# y1 = x + '2'
# print(y1)
# y2 = int(x) + 2
# print(y2)
# d=open('11.txt')
# d1=d.read()
# # print(d1)
# # print(len(d1)) # this icludes spaces also
# for line in d:
# line=line.rstrip()
# if line.startswith('1:'):
# print(line)
# # print(line)
# # print(line)
# # print(d1)
ffile_name = input("Enter file file_name: ")
x = open(ffile_name)
for line in x:
line = line.rstrip()
# line = line.upper()
print (line.upper())