-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1-Sample.py
46 lines (36 loc) · 1.48 KB
/
1-Sample.py
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
# Basic of PYTHON
# (+) (-) (*) (/) (%)-->Remainder (//)--> Quo
# Find--Replace--Capitalize--Lower--Upper--Isalnum--Isalpha--Isdecimal
# Endswith--Startswith--Count--Index--Strip--Lstrip--Rstrip
# Chaining means ---> strip().capitalize()
# A = "Nishanth".replace("Nishanth")
# A = "Nishanth".replace("Nishanth","Mohan")
# A = "nishanth".capitalize()
# A = "nishanth".upper()
# A = "NISHANTH".lower()
# A = "#".isalnum()
# A = "al257".isalnum()
# A = "nishanth".isalpha()
# A = "4nishanth".isalpha()
# A = "nishanth".isdecimal()
# A = '123'.isdecimal()
# A = "Mohan".endswith("n")
# A = "Mohan".endswith("i")
# A = "Mohan".startswith("n")
# A = "Mohan".startswith("M")
# A = "Nishanth".count('h')
# A = "Hai I am Nishanth".index("am")
# Diff B/W [Find and Index]
# A = "Mango".find("i") # It's show -1 ,Nama kudukara value irruka inu find panna sollaroim irruthu its show true illna it's show -1
# A = "Mango".index("i") # It's show Value Error that means substring not found ,> confirm ma na kakara value iruku so nee enaku yathu
# enga irruku inu sollu inu sollaroim irutha it's show true illana it's show substring not found:
# A = " Hello ".strip()
# A = " Hello ".lstrip()
# A = " Hello ".rstrip()
# A = "NiShAnTh&007".capitalize()
# A =" NiShAnTh&oo7 ".strip().capitalize() # This methoad is called chainning
#Print(A)
# Basic for
# number = int(input(" enter the number "))
# for A in range (0,number):
# print(A)