-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassign.py
More file actions
48 lines (30 loc) · 703 Bytes
/
Copy pathassign.py
File metadata and controls
48 lines (30 loc) · 703 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
39
40
41
42
43
44
45
46
# print int idx of char m
# x="programming"
# y="m"
# for i in range (len(x)):
# if x[i]==y:
# print(i)
# rev string
# x="hello everyone lets learn python"
# x=x.split()[::-1]
# x=" ".join(x)
# print(x)
# x="hello everyone lets learn python"
# print(" ".join(x.split()[::-1]))
# x="python learn lets everyone hello"
# rev=" ".join(reversed(x))
# print(rev)
# check if a given string is a valid or not
# x="example@domain.com"
# for i in range(len(x)):
# if
# remove test
# x="This is a test string for testing"
# x=x.replace("test","")
# print(x)
# x="programming"
# seen=set()
# for ch in x:
# if ch not in seen:
# print(ch)
# seen.add(ch)